diff --git a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-placement.yaml b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-placement.yaml index 784d39c5d..005ccdcb2 100644 --- a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-placement.yaml +++ b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-placement.yaml @@ -9,10 +9,10 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - key: name + - key: local-cluster operator: In values: - - local-cluster + - 'true' - requiredClusterSelector: labelSelector: matchExpressions: diff --git a/policygenerator/kustomize/policyGenerator.yaml b/policygenerator/kustomize/policyGenerator.yaml index d6fe6fe5e..dd85cedc2 100644 --- a/policygenerator/kustomize/policyGenerator.yaml +++ b/policygenerator/kustomize/policyGenerator.yaml @@ -8,8 +8,9 @@ policyDefaults: namespace: policies placement: name: demo-placement-rule - clusterSelectors: - name: local-cluster + labelSelector: + matchExpressions: + - {key: "local-cluster", operator: In, values: ["true"]} remediationAction: inform severity: medium policies: diff --git a/policygenerator/policy-sets/community/acs-secure/policyGenerator.yaml b/policygenerator/policy-sets/community/acs-secure/policyGenerator.yaml index 331803c1e..dafcb9c44 100644 --- a/policygenerator/policy-sets/community/acs-secure/policyGenerator.yaml +++ b/policygenerator/policy-sets/community/acs-secure/policyGenerator.yaml @@ -41,7 +41,7 @@ policySets: placement: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} - description: The Advanced Cluster Security components distributed to all OpenShift managed clusters to secure the clusters. name: acs-sensor-clusters @@ -49,4 +49,4 @@ policySets: labelSelector: matchExpressions: - {key: vendor, operator: In, values: ["OpenShift"]} - - {key: name, operator: NotIn, values: ["local-cluster"]} + - {key: "local-cluster", operator: NotIn, values: ["true"]} diff --git a/policygenerator/policy-sets/community/gatekeeper/placement.yaml b/policygenerator/policy-sets/community/gatekeeper/placement.yaml index b19ffb32e..bfa26daed 100644 --- a/policygenerator/policy-sets/community/gatekeeper/placement.yaml +++ b/policygenerator/policy-sets/community/gatekeeper/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/community/kyverno/best-practises-for-apps/placement.yaml b/policygenerator/policy-sets/community/kyverno/best-practises-for-apps/placement.yaml index 930a32ac9..af0d179cf 100644 --- a/policygenerator/policy-sets/community/kyverno/best-practises-for-apps/placement.yaml +++ b/policygenerator/policy-sets/community/kyverno/best-practises-for-apps/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/community/kyverno/multitenancy/placement.yaml b/policygenerator/policy-sets/community/kyverno/multitenancy/placement.yaml index 50e931f09..25f7b0baf 100644 --- a/policygenerator/policy-sets/community/kyverno/multitenancy/placement.yaml +++ b/policygenerator/policy-sets/community/kyverno/multitenancy/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/community/kyverno/security/placement.yaml b/policygenerator/policy-sets/community/kyverno/security/placement.yaml index 3ff03bc19..4ca93b165 100644 --- a/policygenerator/policy-sets/community/kyverno/security/placement.yaml +++ b/policygenerator/policy-sets/community/kyverno/security/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/community/openshift-gitops/placement.yaml b/policygenerator/policy-sets/community/openshift-gitops/placement.yaml index 673630cc7..f31dc2556 100644 --- a/policygenerator/policy-sets/community/openshift-gitops/placement.yaml +++ b/policygenerator/policy-sets/community/openshift-gitops/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/community/openshift-plus-setup/placement.yaml b/policygenerator/policy-sets/community/openshift-plus-setup/placement.yaml index 9b98b2b2e..9b2385e90 100644 --- a/policygenerator/policy-sets/community/openshift-plus-setup/placement.yaml +++ b/policygenerator/policy-sets/community/openshift-plus-setup/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/community/policygenerator-download/generator.yml b/policygenerator/policy-sets/community/policygenerator-download/generator.yml index 4d9def4f3..7b266dddd 100644 --- a/policygenerator/policy-sets/community/policygenerator-download/generator.yml +++ b/policygenerator/policy-sets/community/policygenerator-download/generator.yml @@ -17,7 +17,7 @@ policyDefaults: placement: labelSelector: matchLabels: - name: local-cluster + local-cluster: 'true' policies: - name: acm-policygenerator-downloader diff --git a/policygenerator/policy-sets/stable/acm-hardening/input/placement.yaml b/policygenerator/policy-sets/stable/acm-hardening/input/placement.yaml index c10bbc9f0..7299f2e87 100644 --- a/policygenerator/policy-sets/stable/acm-hardening/input/placement.yaml +++ b/policygenerator/policy-sets/stable/acm-hardening/input/placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]} diff --git a/policygenerator/policy-sets/stable/openshift-plus/input/clusters-placement.yaml b/policygenerator/policy-sets/stable/openshift-plus/input/clusters-placement.yaml index 10fbd8dc2..c31bccefb 100644 --- a/policygenerator/policy-sets/stable/openshift-plus/input/clusters-placement.yaml +++ b/policygenerator/policy-sets/stable/openshift-plus/input/clusters-placement.yaml @@ -9,4 +9,4 @@ spec: labelSelector: matchExpressions: - {key: vendor, operator: In, values: ["OpenShift"]} - - {key: name, operator: NotIn, values: ["local-cluster"]} + - {key: "local-cluster", operator: NotIn, values: ["true"]} diff --git a/policygenerator/policy-sets/stable/openshift-plus/input/hub-placement.yaml b/policygenerator/policy-sets/stable/openshift-plus/input/hub-placement.yaml index 14e360448..460673c0c 100644 --- a/policygenerator/policy-sets/stable/openshift-plus/input/hub-placement.yaml +++ b/policygenerator/policy-sets/stable/openshift-plus/input/hub-placement.yaml @@ -8,4 +8,4 @@ spec: - requiredClusterSelector: labelSelector: matchExpressions: - - {key: name, operator: In, values: ["local-cluster"]} + - {key: "local-cluster", operator: In, values: ["true"]}