Skip to content

Commit 75c51cc

Browse files
committed
Add overrides for MCE IIB
We need to be able to explicitely override the Source and the Channel used to install the MCE multicluster-engine operator. The reason for this is that when we install ACM from an IIB, the default channel that will be used for MCE won't be present in the IIB, so we need to be able to be flexible in determining where the MCE gets installed from (sourcecatalog and channel) We default to redhat-operators because otherwise when installing gitops via IIB the ACM operator finds a channel for MCE that does not exist, so we force the source all the time.
1 parent 72a8b26 commit 75c51cc

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

acm/templates/multiclusterhub.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
{{- $channel := "" }}
2+
{{- if .Values.acm.mce_operator.channel }}
3+
{{- $channel = printf ",\"channel\": \"%s\"" .Values.acm.mce_operator.channel }}
4+
{{- end }}
15
apiVersion: operator.open-cluster-management.io/v1
26
kind: MultiClusterHub
37
metadata:
48
name: multiclusterhub
59
namespace: open-cluster-management
610
annotations:
711
argocd.argoproj.io/sync-wave: "-1"
8-
{{- if kindIs "map" .Values.clusterGroup.subscriptions }}
9-
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "{{ default "redhat-operators" .Values.clusterGroup.subscriptions.acm.source }}" }'
10-
{{- end }}
12+
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "{{ default "redhat-operators" .Values.acm.mce_operator.source }}" {{- $channel }} }'
1113
spec: {}

acm/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ clusterGroup:
3030
# - name: clusterGroup
3131
# value: region-one
3232

33+
acm:
34+
# Just used for IIB testing, drives the source and channel for the MCE
35+
# subscription triggered by ACM
36+
mce_operator:
37+
source: redhat-operators
38+
channel: null
39+
40+
41+
3342
secretStore:
3443
name: vault-backend
3544
kind: ClusterSecretStore

tests/acm-industrial-edge-factory.expected.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ metadata:
2222
namespace: open-cluster-management
2323
annotations:
2424
argocd.argoproj.io/sync-wave: "-1"
25+
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "redhat-operators" }'
2526
spec: {}
2627
---
2728
# Source: acm/templates/policies/ocp-gitops-policy.yaml

0 commit comments

Comments
 (0)