Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion templates/multiclusterhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ metadata:
annotations:
argocd.argoproj.io/sync-wave: "-1"
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "{{ default "redhat-operators" .Values.acm.mce_operator.source }}" {{- $channel }} }'
spec: {}
spec:
{{ .Values.acm.mch_spec | toYaml | indent 2 }}
36 changes: 36 additions & 0 deletions tests/multiclusterhub_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,39 @@ tests:
- equal:
path: metadata.annotations["installer.open-cluster-management.io/mce-subscription-spec"]
value: '{"source": "foo-source","channel": "foo-channel" }'

- it: Should have empty spec by default
asserts:
- equal:
path: spec
value: {}

- it: Should set custom spec when mch_spec is provided
set:
acm:
mch_spec:
disableHubSelfManagement: true
availabilityConfig: High
asserts:
- equal:
path: spec.disableHubSelfManagement
value: true
- equal:
path: spec.availabilityConfig
value: High

- it: Should set nested spec properties when mch_spec has nested values
set:
acm:
mch_spec:
overrides:
components:
- name: cluster-backup
enabled: true
asserts:
- equal:
path: spec.overrides.components[0].name
value: cluster-backup
- equal:
path: spec.overrides.components[0].enabled
value: true
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ clusterGroup:
# value: region-two

acm:
# @default -- MultiClusterHub spec (empty by default)
mch_spec: {}

# -- Just used for IIB testing, drives the source and channel for the MCE subscription triggered by ACM
# @default -- Uses the official redhat sources
mce_operator:
Expand Down