Skip to content

Commit db27853

Browse files
dhaiducekopenshift-merge-robot
authored andcommitted
Fix placement doc
- Add PlacementRule deprecation notes - Fix incorrect labelSelector/clusterSelector references Signed-off-by: Dale Haiducek <[email protected]>
1 parent 9c0870b commit db27853

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

docs/policygenerator-reference.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ policyDefaults:
112112
# Optional. The placement configuration for the policies. This defaults to a placement configuration that matches all
113113
# clusters.
114114
placement:
115-
# Deprecated: use clusterSelector instead
115+
# Deprecated: PlacementRule is deprecated. Use labelSelector instead to generate a Placement.
116116
# To specify a placement rule, specify key:value pair cluster selectors or the full YAML for the desired cluster
117117
# selectors. (See placementRulePath to specify an existing file instead.)
118118
clusterSelectors: {}
119-
# To specify a placement rule, specify key:value pair cluster selectors or the full LabelSelector for the desired cluster
120-
# selectors. (See placementRulePath to specify an existing file instead.)
119+
# Deprecated: PlacementRule is deprecated. Use labelSelector instead to generate a Placement.
120+
# To specify a placement rule, specify key:value pair cluster selectors or the full LabelSelector for the desired
121+
# cluster selector. (See placementRulePath to specify an existing file instead.)
121122
# For example, to specify a placement rule using matchExpressions:
122123
# clusterSelector:
123124
# matchExpressions:
@@ -126,8 +127,8 @@ policyDefaults:
126127
# values:
127128
# - "cloud"
128129
clusterSelector: {}
129-
# To specify a placement, specify key:value pair cluster label selectors or the full LabelSelector for the desired cluster
130-
# label selectors. (See placementPath to specify an existing file instead.)
130+
# To specify a placement, specify key:value pair cluster label selectors or the full LabelSelector for the desired
131+
# cluster label selector. (See placementPath to specify an existing file instead.)
131132
# For example, to specify a placement using matchExpressions:
132133
# labelSelector:
133134
# matchExpressions:
@@ -139,17 +140,18 @@ policyDefaults:
139140
# Optional. Specifying a name will consolidate placement rules that contain the same cluster selectors.
140141
name: ""
141142
# To reuse an existing placement manifest, specify the path here relative to the kustomization.yaml file. If given,
142-
# this placement will be used by all policies by default. (See clusterSelectors to generate a new Placement
143-
# instead.)
143+
# this placement will be used by all policies by default. (See labelSelector to generate a new Placement instead.)
144144
placementPath: ""
145+
# Deprecated: PlacementRule is deprecated. Use placementPath instead to specify a Placement.
145146
# To reuse an existing placement rule manifest, specify the path here relative to the kustomization.yaml file. If
146-
# given, this placement rule will be used by all policies by default. (See clusterSelectors to generate a new
147+
# given, this placement rule will be used by all policies by default. (See clusterSelector to generate a new
147148
# PlacementRule instead.)
148149
placementRulePath: ""
149150
# Use a placement that already exists in the cluster in the same namespace as the policy to be generated. It is the
150151
# responsibility of the administrator to ensure the placement exists. Use of this setting will prevent a Placement
151152
# from being generated, but the Placement Binding will still be created.
152153
placementName: ""
154+
# Deprecated: PlacementRule is deprecated. Use placementName instead to specify a Placement.
153155
# Use a placement rule that already exists in the cluster in the same namespace as the policy to be generated. It is
154156
# the responsibility of the administrator to ensure the placement rule exists. Use of this setting will prevent a
155157
# placement rule from being generated, but the placement binding will still be created.

docs/policygenerator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ generator plugin to be enabled.
1818

1919
By default, a Placement and PlacementBinding are created for each policy with the policy name as the
2020
suffix. To signal that you'd like to consolidate policies that use the same Placement under a single
21-
PlacementBinding, either specify `placement.placementRulePath` to an existing Placement manifest or set
22-
`placement.name` along with `placement.clusterSelectors`. When the PlacementBinding is consolidated in
21+
PlacementBinding, either specify `placement.placementRulePath` to an existing Placement rule manifest or
22+
set `placement.name` along with `placement.clusterSelector`. When the PlacementBinding is consolidated in
2323
this way, `placementBindingDefaults.name` must be specified so that the generator can create unique
2424
names for the bindings.
2525

examples/policyGenerator.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ policyDefaults:
1515
placementRulePath: input/placementrule.yaml
1616
# Example of using clusterSelectors to generate a placement rule
1717
# placement:
18-
# clusterSelectors:
19-
# cloud: red hat
18+
# clusterSelector:
19+
# matchLabels:
20+
# cloud: red hat
2021
remediationAction: inform
2122
severity: medium
2223
# standards: []

0 commit comments

Comments
 (0)