Skip to content

Commit 622eff5

Browse files
committed
Explicitly set the namespace for acm objects
1 parent 9d4437e commit 622eff5

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

managedClusters/templates/acm/policies/application-policies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ apiVersion: policy.open-cluster-management.io/v1
66
kind: Policy
77
metadata:
88
name: {{ .name }}-clustergroup-policy
9+
namespace: open-cluster-management
910
annotations:
1011
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
1112
argocd.argoproj.io/compare-options: IgnoreExtraneous
@@ -98,6 +99,7 @@ apiVersion: policy.open-cluster-management.io/v1
9899
kind: PlacementBinding
99100
metadata:
100101
name: {{ .name }}-placement-binding
102+
namespace: open-cluster-management
101103
annotations:
102104
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
103105
placementRef:
@@ -113,6 +115,7 @@ apiVersion: apps.open-cluster-management.io/v1
113115
kind: PlacementRule
114116
metadata:
115117
name: {{ .name }}-placement
118+
namespace: open-cluster-management
116119
spec:
117120
clusterConditions:
118121
- status: 'True'

managedClusters/templates/acm/policies/ocp-gitops-policy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ apiVersion: policy.open-cluster-management.io/v1
99
kind: Policy
1010
metadata:
1111
name: openshift-gitops-policy
12+
namespace: open-cluster-management
1213
annotations:
1314
policy.open-cluster-management.io/standards: NIST-CSF
1415
policy.open-cluster-management.io/categories: PR.DS Data Security
@@ -56,6 +57,7 @@ apiVersion: policy.open-cluster-management.io/v1
5657
kind: PlacementBinding
5758
metadata:
5859
name: openshift-gitops-placement-binding
60+
namespace: open-cluster-management
5961
annotations:
6062
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
6163
placementRef:
@@ -71,6 +73,7 @@ apiVersion: apps.open-cluster-management.io/v1
7173
kind: PlacementRule
7274
metadata:
7375
name: openshift-gitops-placement
76+
namespace: open-cluster-management
7477
spec:
7578
clusterConditions:
7679
- status: 'True'

tests/managedClusters.expected.diff

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- tests/managedClusters-naked.expected.yml
22
+++ tests/managedClusters-normal.expected.yml
3-
@@ -1,3 +1,963 @@
3+
@@ -1,3 +1,972 @@
44
---
55
+# Source: acm/templates/acm/provision/secrets-common.yaml
66
+apiVersion: v1
@@ -669,6 +669,7 @@
669669
+kind: PlacementBinding
670670
+metadata:
671671
+ name: acm-edge-placement-binding
672+
+ namespace: open-cluster-management
672673
+ annotations:
673674
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
674675
+placementRef:
@@ -685,6 +686,7 @@
685686
+kind: PlacementBinding
686687
+metadata:
687688
+ name: acm-provision-edge-placement-binding
689+
+ namespace: open-cluster-management
688690
+ annotations:
689691
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
690692
+placementRef:
@@ -701,6 +703,7 @@
701703
+kind: PlacementBinding
702704
+metadata:
703705
+ name: openshift-gitops-placement-binding
706+
+ namespace: open-cluster-management
704707
+ annotations:
705708
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
706709
+placementRef:
@@ -717,6 +720,7 @@
717720
+kind: PlacementRule
718721
+metadata:
719722
+ name: acm-edge-placement
723+
+ namespace: open-cluster-management
720724
+spec:
721725
+ clusterConditions:
722726
+ - status: 'True'
@@ -730,6 +734,7 @@
730734
+kind: PlacementRule
731735
+metadata:
732736
+ name: acm-provision-edge-placement
737+
+ namespace: open-cluster-management
733738
+spec:
734739
+ clusterConditions:
735740
+ - status: 'True'
@@ -743,6 +748,7 @@
743748
+kind: PlacementRule
744749
+metadata:
745750
+ name: openshift-gitops-placement
751+
+ namespace: open-cluster-management
746752
+spec:
747753
+ clusterConditions:
748754
+ - status: 'True'
@@ -760,6 +766,7 @@
760766
+kind: Policy
761767
+metadata:
762768
+ name: acm-edge-clustergroup-policy
769+
+ namespace: open-cluster-management
763770
+ annotations:
764771
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
765772
+ argocd.argoproj.io/compare-options: IgnoreExtraneous
@@ -841,6 +848,7 @@
841848
+kind: Policy
842849
+metadata:
843850
+ name: acm-provision-edge-clustergroup-policy
851+
+ namespace: open-cluster-management
844852
+ annotations:
845853
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
846854
+ argocd.argoproj.io/compare-options: IgnoreExtraneous
@@ -922,6 +930,7 @@
922930
+kind: Policy
923931
+metadata:
924932
+ name: openshift-gitops-policy
933+
+ namespace: open-cluster-management
925934
+ annotations:
926935
+ policy.open-cluster-management.io/standards: NIST-CSF
927936
+ policy.open-cluster-management.io/categories: PR.DS Data Security

0 commit comments

Comments
 (0)