Skip to content

Commit

Permalink
Explicitly set the namespace for acm objects
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Oct 3, 2022
1 parent 9d4437e commit 622eff5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
name: {{ .name }}-clustergroup-policy
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/compare-options: IgnoreExtraneous
Expand Down Expand Up @@ -98,6 +99,7 @@ apiVersion: policy.open-cluster-management.io/v1
kind: PlacementBinding
metadata:
name: {{ .name }}-placement-binding
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
placementRef:
Expand All @@ -113,6 +115,7 @@ apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
name: {{ .name }}-placement
namespace: open-cluster-management
spec:
clusterConditions:
- status: 'True'
Expand Down
3 changes: 3 additions & 0 deletions managedClusters/templates/acm/policies/ocp-gitops-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
name: openshift-gitops-policy
namespace: open-cluster-management
annotations:
policy.open-cluster-management.io/standards: NIST-CSF
policy.open-cluster-management.io/categories: PR.DS Data Security
Expand Down Expand Up @@ -56,6 +57,7 @@ apiVersion: policy.open-cluster-management.io/v1
kind: PlacementBinding
metadata:
name: openshift-gitops-placement-binding
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
placementRef:
Expand All @@ -71,6 +73,7 @@ apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
name: openshift-gitops-placement
namespace: open-cluster-management
spec:
clusterConditions:
- status: 'True'
Expand Down
11 changes: 10 additions & 1 deletion tests/managedClusters.expected.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- tests/managedClusters-naked.expected.yml
+++ tests/managedClusters-normal.expected.yml
@@ -1,3 +1,963 @@
@@ -1,3 +1,972 @@
---
+# Source: acm/templates/acm/provision/secrets-common.yaml
+apiVersion: v1
Expand Down Expand Up @@ -669,6 +669,7 @@
+kind: PlacementBinding
+metadata:
+ name: acm-edge-placement-binding
+ namespace: open-cluster-management
+ annotations:
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
+placementRef:
Expand All @@ -685,6 +686,7 @@
+kind: PlacementBinding
+metadata:
+ name: acm-provision-edge-placement-binding
+ namespace: open-cluster-management
+ annotations:
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
+placementRef:
Expand All @@ -701,6 +703,7 @@
+kind: PlacementBinding
+metadata:
+ name: openshift-gitops-placement-binding
+ namespace: open-cluster-management
+ annotations:
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
+placementRef:
Expand All @@ -717,6 +720,7 @@
+kind: PlacementRule
+metadata:
+ name: acm-edge-placement
+ namespace: open-cluster-management
+spec:
+ clusterConditions:
+ - status: 'True'
Expand All @@ -730,6 +734,7 @@
+kind: PlacementRule
+metadata:
+ name: acm-provision-edge-placement
+ namespace: open-cluster-management
+spec:
+ clusterConditions:
+ - status: 'True'
Expand All @@ -743,6 +748,7 @@
+kind: PlacementRule
+metadata:
+ name: openshift-gitops-placement
+ namespace: open-cluster-management
+spec:
+ clusterConditions:
+ - status: 'True'
Expand All @@ -760,6 +766,7 @@
+kind: Policy
+metadata:
+ name: acm-edge-clustergroup-policy
+ namespace: open-cluster-management
+ annotations:
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
+ argocd.argoproj.io/compare-options: IgnoreExtraneous
Expand Down Expand Up @@ -841,6 +848,7 @@
+kind: Policy
+metadata:
+ name: acm-provision-edge-clustergroup-policy
+ namespace: open-cluster-management
+ annotations:
+ argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
+ argocd.argoproj.io/compare-options: IgnoreExtraneous
Expand Down Expand Up @@ -922,6 +930,7 @@
+kind: Policy
+metadata:
+ name: openshift-gitops-policy
+ namespace: open-cluster-management
+ annotations:
+ policy.open-cluster-management.io/standards: NIST-CSF
+ policy.open-cluster-management.io/categories: PR.DS Data Security
Expand Down

0 comments on commit 622eff5

Please sign in to comment.