Skip to content

Commit 88b8d04

Browse files
authored
ACM 2.12 / MCE 2.7 production release (#848)
MCE + policy prod release Signed-off-by: Gerd Oberlechner <[email protected]>
1 parent 44e8c3e commit 88b8d04

24 files changed

+335
-210
lines changed

acm/Makefile

+6-9
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ DEPLOY_ENV ?= personal-dev
33
$(shell ../templatize.sh $(DEPLOY_ENV) config.tmpl.mk config.mk)
44
include config.mk
55

6-
MCE_OPERATOR_BUNDLE_IMAGE ?= quay.io/acm-d/mce-operator-bundle:v2.7.0-110
7-
REGISTRY ?= ${ARO_HCP_IMAGE_ACR}.azurecr.io/acm-d-mce
8-
# once MCE 2.7 is released, we can find the official bundle image here
9-
# https://catalog.redhat.com/software/containers/multicluster-engine/mce-operator-bundle/6160406290fb938ecf6009c6
6+
MCE_OPERATOR_BUNDLE_IMAGE ?= registry.redhat.io/multicluster-engine/mce-operator-bundle:v2.7.0-116
7+
REGISTRY ?= ${ARO_HCP_IMAGE_ACR}.azurecr.io
108

119
MCE_OPERATOR_BUNDLE_FILE = mce-operator-bundle.tgz
1210
HELM_BASE_DIR = deploy/helm
1311
MCE_CHART_DIR = ${HELM_BASE_DIR}/multicluster-engine
1412
MCE_CONFIG_DIR = ${HELM_BASE_DIR}/multicluster-engine-config
1513
MCE_NS = multicluster-engine
1614
POLICY_HELM_REPO = https://github.com/stolostron/mce-install-kube.git
15+
POLICY_HELM_REPO_BRANCH = release-2.12
1716

1817
deploy:
1918
@kubectl create namespace ${MCE_NS} --dry-run=client -o json | kubectl apply -f -
@@ -23,7 +22,8 @@ deploy:
2322
--set imageRegistry=${REGISTRY}
2423
helm upgrade --install --wait --wait-for-jobs \
2524
mce-config ${MCE_CONFIG_DIR} \
26-
--namespace ${MCE_NS}
25+
--namespace ${MCE_NS} \
26+
--set global.registryOverride=${REGISTRY}
2727

2828
helm-chart:
2929
@podman pull --arch amd64 ${MCE_OPERATOR_BUNDLE_IMAGE}
@@ -37,14 +37,11 @@ helm-chart:
3737

3838
@echo "Cloning remote mce-install-kube repository..."
3939
TMP_DIR=$$(mktemp -d) && \
40-
git clone ${POLICY_HELM_REPO} $$TMP_DIR && \
40+
git clone --branch ${POLICY_HELM_REPO_BRANCH} ${POLICY_HELM_REPO} $$TMP_DIR && \
4141
rm -rf ${MCE_CONFIG_DIR}/charts && \
4242
mkdir -p ${MCE_CONFIG_DIR}/charts && \
4343
cp -r $$TMP_DIR/policy ${MCE_CONFIG_DIR}/charts && \
4444
rm -rf $$TMP_DIR
4545
@echo "Helm chart imported successfully."
4646

47-
import-chart:
48-
49-
5047
.PHONY: deploy helm-chart

acm/README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,26 @@
22

33
This folder contains helm charts and automation to managed helm charts for the ACM components `MCE` and `policy`.
44

5+
## Structure
6+
57
Installation and configuration are split into two individual helm charts
68

7-
## multicluster-engine
9+
### multicluster-engine
810

911
This helm chart installs the MCE operator. The chart is autogenerated from an OLM release-bundle of MCE by running `make helm-chart`. The resulting chart is then commited into the repository.
1012

1113
To update MCE, change the `MCE_OPERATOR_BUNDLE_IMAGE` variable in the Makefile. If you are testing pre-releases from the `quay.io/acm-d` organization, make sure the `REGISTRY` env var in the Makefile is set to `${ARO_HCP_IMAGE_ACR}.azurecr.io/acm-d-mce`. For production releases set it to `${ARO_HCP_IMAGE_ACR}.azurecr.io` instead.
1214

13-
## multicluster-engine-config
15+
### multicluster-engine-config
1416

1517
This helm chart configures MCE and installs the `policy` component on top of it. The subchart for `policy` is imported into this repo by running `make helm-chart`. It can be found [in the ACM upstream Github org](https://github.com/stolostron/mce-install-kube) and is maintained by the ACM team.
1618

1719
Updating `policy` needs to be done with care for now, since the content of the helm chart repo is not tagged. We are working on it.
20+
21+
## Updating charts
22+
23+
To update the `multicluster-engine` chart, lookup the desired install MCE OLM bundle on [https://catalog.redhat.com](https://catalog.redhat.com/software/containers/multicluster-engine/mce-operator-bundle/6160406290fb938ecf6009c6) and update the `MCE_OPERATOR_BUNDLE_IMAGE` variable in `Makefile`.
24+
25+
To update the `multicluster-engine-config/policy` subchart, update the `POLICY_HELM_REPO_BRANCH` variable in the `Makefile` for the desired release.
26+
27+
Run `make helm-chart` to update all charts. Review and commit all changes to the `deploy/helm` directory.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apiVersion: v2
2-
appVersion: 2.12.0
3-
version: 2.12.0
2+
appVersion: v2.12.0
3+
version: v2.12.0
44
description: A Helm chart for ACM addons
55
name: policy
66

77
dependencies:
88
- name: grc
9-
version: "2.12.0"
9+
version: "v2.12.0"
1010
- name: cluster-lifecycle
11-
version: "2.12.0"
11+
version: "v2.12.0"

acm/deploy/helm/multicluster-engine-config/charts/policy/charts/cluster-lifecycle/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Copyright Contributors to the Open Cluster Management project
33

44
apiVersion: v2
5-
appVersion: 2.12.0
5+
appVersion: v2.12.0
66
description: Helm chart for deploying the cluster lifecycle
77
kubeVersion: ">=1.11.0-0"
88
name: cluster-lifecycle
9-
version: 2.12.0
9+
version: v2.12.0

acm/deploy/helm/multicluster-engine-config/charts/policy/charts/cluster-lifecycle/templates/klusterlet-addon-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ spec:
7979
{{- end }}
8080
containers:
8181
- name: klusterlet-addon-controller
82-
image: "{{ .Values.global.imageOverrides.klusterlet_addon_controller }}"
82+
image: "{{ .Values.global.registryOverride}}/{{ .Values.global.imageOverrides.klusterlet_addon_controller }}"
8383
imagePullPolicy: {{ .Values.global.pullPolicy }}
8484
securityContext:
8585
allowPrivilegeEscalation: false

acm/deploy/helm/multicluster-engine-config/charts/policy/charts/grc/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Copyright Contributors to the Open Cluster Management project
33

44
apiVersion: v2
5-
appVersion: 2.12.0
5+
appVersion: v2.12.0
66
description: A Helm chart for multicloud grc
77
keywords:
88
- acm
99
- grc
1010
name: grc
11-
version: 2.12.0
11+
version: v2.12.0

acm/deploy/helm/multicluster-engine-config/charts/policy/charts/grc/templates/grc-policy-addon-controller.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ spec:
6969
apiVersion: v1
7070
fieldPath: metadata.name
7171
- name: CONFIG_POLICY_CONTROLLER_IMAGE
72-
value: {{ .Values.global.imageOverrides.config_policy_controller }}
72+
value: "{{ .Values.global.registryOverride}}/{{ .Values.global.imageOverrides.config_policy_controller }}"
7373
- name: GOVERNANCE_POLICY_FRAMEWORK_ADDON_IMAGE
74-
value: {{ .Values.global.imageOverrides.governance_policy_framework_addon }}
75-
image: {{ .Values.global.imageOverrides.governance_policy_addon_controller }}
74+
value: "{{ .Values.global.registryOverride}}/{{ .Values.global.imageOverrides.governance_policy_framework_addon }}"
75+
image: "{{ .Values.global.registryOverride}}/{{ .Values.global.imageOverrides.governance_policy_addon_controller }}"
7676
imagePullPolicy: IfNotPresent
7777
name: manager
7878
resources:

acm/deploy/helm/multicluster-engine-config/charts/policy/charts/grc/templates/grc-policy-propagator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ spec:
8181
fieldPath: metadata.name
8282
- name: OPERATOR_NAME
8383
value: governance-policy-propagator
84-
image: {{ .Values.global.imageOverrides.governance_policy_propagator }}
84+
image: "{{ .Values.global.registryOverride}}/{{ .Values.global.imageOverrides.governance_policy_propagator }}"
8585
imagePullPolicy: IfNotPresent
8686
livenessProbe:
8787
exec:

acm/deploy/helm/multicluster-engine-config/charts/policy/charts/grc/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) 2020 Red Hat, Inc.
22

33
global:
4+
registryOverride: ""
45
imageOverrides:
56
governance_policy_propagator: ""
67
governance_policy_addon_controller: ""

acm/deploy/helm/multicluster-engine-config/charts/policy/crds/policy.open-cluster-management.io_policyautomations.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ spec:
5656
x-kubernetes-preserve-unknown-fields: true
5757
jobTtl:
5858
description: >-
59-
JobTTL sets the time to live for the Kubernetes AnsibleJob object after the Ansible job run has
60-
finished.
59+
JobTTL sets the time to live for the Kubernetes Job object after the Ansible job playbook run
60+
has finished.
6161
type: integer
6262
name:
6363
description: Name of the Ansible Template to run in Ansible Automation
@@ -91,6 +91,7 @@ spec:
9191
minimum: 0
9292
type: integer
9393
eventHook:
94+
default: noncompliant
9495
description: >-
9596
EventHook specifies the compliance state that initiates automation. This must be set to
9697
"noncompliant".
@@ -116,7 +117,6 @@ spec:
116117
type: string
117118
required:
118119
- automationDef
119-
- eventHook
120120
- mode
121121
- policyRef
122122
type: object

acm/deploy/helm/multicluster-engine-config/charts/policy/values.yaml

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
global:
2+
registryOverride: "registry.redhat.io"
23
imageOverrides:
3-
# upstream images
4-
governance_policy_propagator: "quay.io/stolostron/governance-policy-propagator:2.12.0-SNAPSHOT-2024-09-30-01-46-06"
5-
governance_policy_addon_controller: "quay.io/stolostron/governance-policy-addon-controller:2.12.0-SNAPSHOT-2024-09-30-01-46-06"
6-
config_policy_controller: "quay.io/stolostron/config-policy-controller:2.12.0-SNAPSHOT-2024-09-30-01-46-06"
7-
governance_policy_framework_addon: "quay.io/stolostron/governance-policy-framework-addon:2.12.0-SNAPSHOT-2024-09-30-01-46-06"
8-
klusterlet_addon_controller: "quay.io/stolostron/klusterlet-addon-controller:2.12.0-SNAPSHOT-2024-09-30-01-46-06"
4+
governance_policy_propagator: "rhacm2/governance-policy-propagator-rhel9@sha256:f2fa1a7c7af6379eda44a691de57eb59dc8068aadb98504df7ef4a5e059a0cfa"
5+
governance_policy_addon_controller: "rhacm2/acm-governance-policy-addon-controller-rhel9@sha256:7b2f432d7ea6b9eb9c4df6df88ae3d5bfc261a8d24a5146a04d3465a41d99e10"
6+
config_policy_controller: "rhacm2/config-policy-controller-rhel9@sha256:bad96b2cd7efd604b3ef8092eb72c5a7d33b39732a1a8fe995aa197ead7a5d31"
7+
governance_policy_framework_addon: "rhacm2/acm-governance-policy-framework-addon-rhel9@sha256:a5373e3aed5c8e0ac1427599c3801eccd3b4ff4bdc3f9c0cd7083ff3e34433b3"
8+
klusterlet_addon_controller: "rhacm2/klusterlet-addon-controller-rhel9@sha256:f8188bc955dbc635031e765fb09015926eb350a7484e6c9f2e0af6020e02aa30"
99

10-
# images in ACM 2.11.2
11-
# governance_policy_propagator: "registry.redhat.io/rhacm2/governance-policy-propagator-rhel9@sha256:af848e7e31d8ec9b5ad1896a5d5ccc67f320a7740245c190ba8a76757984e65b"
12-
# governance_policy_addon_controller: "registry.redhat.io/rhacm2/acm-governance-policy-addon-controller-rhel9@sha256:fc0708f0a6d5266fb544f41b61d9697d370c8c5e297e4e3f13de8656f9c2b049"
13-
# config_policy_controller: "registry.redhat.io/rhacm2/config-policy-controller-rhel9@sha256:cecf914d7fb7759a4f512c1ec53a077dcb1c7e405c22a5bf6af1bf5878cf3c42"
14-
# governance_policy_framework_addon: "registry.redhat.io/rhacm2/acm-governance-policy-framework-addon-rhel9@sha256:a4880f6e82d2b82606203ea855d0418bb29b3d4535f8bc7a9ef4074258c18674"
15-
# klusterlet_addon_controller: "registry.redhat.io/rhacm2/klusterlet-addon-controller-rhel9@sha256:478e3e6cda0d74f43b0f05911d023344108a5cd79d57d5cc9f268ad064848a00"
1610
namespace: multicluster-engine
1711
pullSecret: open-cluster-management-image-pull-credentials
1812

acm/deploy/helm/multicluster-engine-config/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ localCluster:
22
kubeApiUrl: https://kubernetes.default.svc
33
addonConfig:
44
applicationManagerEnabled: false
5-
certPolicyControllerEnabled: true
5+
certPolicyControllerEnabled: false
66
policyControllerEnabled: true
77
searchCollectorEnabled: false
8+
9+
global:
10+
registryOverride: ""

acm/deploy/helm/multicluster-engine/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ keywords:
77
- multiclusterengine
88
name: multicluster-engine
99
sources:
10-
- oci://quay.io/acm-d/mce-operator-bundle:v2.7.0-110
10+
- oci://registry.redhat.io/multicluster-engine/mce-operator-bundle:v2.7.0-116
1111
type: application
1212
version: 2.7.0

0 commit comments

Comments
 (0)