Skip to content

Commit

Permalink
Update placements to use local-cluster label
Browse files Browse the repository at this point in the history
Basing things off of only the name being "local-cluster" may not be
reliable.

Refs:
 - https://issues.redhat.com/browse/ACM-13274

Signed-off-by: Justin Kulikauskas <[email protected]>
  • Loading branch information
JustinKuli authored and openshift-merge-bot[bot] committed Aug 20, 2024
1 parent f8d8dc9 commit 281bb27
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- key: name
- key: local-cluster
operator: In
values:
- local-cluster
- 'true'
- requiredClusterSelector:
labelSelector:
matchExpressions:
Expand Down
5 changes: 3 additions & 2 deletions policygenerator/kustomize/policyGenerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ 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
placement:
labelSelector:
matchExpressions:
- {key: vendor, operator: In, values: ["OpenShift"]}
- {key: name, operator: NotIn, values: ["local-cluster"]}
- {key: "local-cluster", operator: NotIn, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ policyDefaults:
placement:
labelSelector:
matchLabels:
name: local-cluster
local-cluster: 'true'

policies:
- name: acm-policygenerator-downloader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- {key: name, operator: In, values: ["local-cluster"]}
- {key: "local-cluster", operator: In, values: ["true"]}

0 comments on commit 281bb27

Please sign in to comment.