From 4353d7f220848df51be6ccaf67781c22d245eef6 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Wed, 13 May 2026 09:28:56 +0200 Subject: [PATCH] Add mch annotation We need to be sure if it was us creating it via patterns or not in order to inform our uninstall process more accurately --- templates/multiclusterhub.yaml | 1 + tests/multiclusterhub_test.yaml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/templates/multiclusterhub.yaml b/templates/multiclusterhub.yaml index f003b69..82a6f20 100644 --- a/templates/multiclusterhub.yaml +++ b/templates/multiclusterhub.yaml @@ -9,5 +9,6 @@ metadata: namespace: open-cluster-management annotations: installer.open-cluster-management.io/mce-subscription-spec: '{"source": "{{ default "redhat-operators" .Values.acm.mce_operator.source }}" {{- $channel }} }' + patterns.gitops.validatedpatterns.io/managed: true spec: {{ .Values.acm.mch_spec | toYaml | indent 2 }} diff --git a/tests/multiclusterhub_test.yaml b/tests/multiclusterhub_test.yaml index 2262e82..5e8cb95 100644 --- a/tests/multiclusterhub_test.yaml +++ b/tests/multiclusterhub_test.yaml @@ -40,6 +40,12 @@ tests: path: metadata.annotations["installer.open-cluster-management.io/mce-subscription-spec"] value: '{"source": "foo-source","channel": "foo-channel" }' + - it: Should have the managed annotation + asserts: + - equal: + path: metadata.annotations["patterns.gitops.validatedpatterns.io/managed"] + value: true + - it: Should have empty spec by default asserts: - equal: