Skip to content

Commit 2603663

Browse files
JustinKuliopenshift-merge-robot
authored andcommitted
Stop deleting Policy CRD on hub
The previous attempt to address this issue actually caused the issue in upgrade situations. The new approach ensures that the CRD will not be deleted on the hub when the addon is removed. There is still a potential conflict because this CRD will be defined on the hub by this controller, and another installer. In a future release, after this "deletion-orphan" annotation has been added, it might be possible to stop defining the CRD on the hub through this controller. Refs: - https://issues.redhat.com/browse/ACM-4917 Signed-off-by: Justin Kulikauskas <[email protected]>
1 parent 3d147cb commit 2603663

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/addon/policyframework/manifests/managedclusterchart/templates/policy.open-cluster-management.io_policies_crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ kind: CustomResourceDefinition
88
metadata:
99
annotations:
1010
controller-gen.kubebuilder.io/version: v0.6.1
11+
{{- if .Values.onMulticlusterHub }}
12+
"addon.open-cluster-management.io/deletion-orphan": ""
13+
{{- end }}
1114
creationTimestamp: null
1215
name: policies.policy.open-cluster-management.io
1316
labels:
@@ -237,6 +240,9 @@ kind: CustomResourceDefinition
237240
metadata:
238241
annotations:
239242
controller-gen.kubebuilder.io/version: v0.6.1
243+
{{- if .Values.onMulticlusterHub }}
244+
"addon.open-cluster-management.io/deletion-orphan": ""
245+
{{- end }}
240246
creationTimestamp: null
241247
name: policies.policy.open-cluster-management.io
242248
labels:

0 commit comments

Comments
 (0)