@@ -9,6 +9,9 @@ metadata:
99placementBindingDefaults :
1010 # Set an explicit placement binding name to use rather than rely on the default.
1111 name : " "
12+ # Optional. Set an explicit placement binding name to use for generated selective enforcement bindings
13+ # rather than rely on the default.
14+ enforcementName : " "
1215
1316# Required. Defaults for policy generation. Any default value listed here can be overridden under an entry in the
1417# policies array except for "namespace".
@@ -154,6 +157,30 @@ policyDefaults:
154157 # responsibility of the administrator to ensure the placement exists. Use of this setting will prevent a Placement
155158 # from being generated, but the Placement Binding will still be created.
156159 placementName : " "
160+ # Optional. The placement configuration for the selective enforcement binding of the policies. When set, the
161+ # generator creates a second Placement and PlacementBinding with `subFilter: restricted` and
162+ # `bindingOverrides.remediationAction: enforce`. This defaults to unset.
163+ enforcementPlacement :
164+ # To specify a placement, specify key:value pair cluster label selectors or the full LabelSelector for the desired
165+ # cluster label selector. (See placementPath to specify an existing file instead.)
166+ # For example, to specify a placement using matchExpressions:
167+ # labelSelector:
168+ # matchExpressions:
169+ # - key: provider
170+ # operator: NotIn
171+ # values:
172+ # - "cloud"
173+ labelSelector : {}
174+ # Optional. Specifying a name will consolidate placements that contain the same cluster selectors.
175+ # A name alone does not enable selective enforcement generation; also set labelSelector.
176+ name : " "
177+ # To reuse an existing placement manifest, specify the path here relative to the kustomization.yaml file. If given,
178+ # this placement will be used by all policies by default. (See labelSelector to generate a new Placement instead.)
179+ placementPath : " "
180+ # Use a placement that already exists in the cluster in the same namespace as the policy to be generated. It is the
181+ # responsibility of the administrator to ensure the placement exists. Use of this setting will prevent a Placement
182+ # from being generated, but the Placement Binding will still be created.
183+ placementName : " "
157184 # Optional. recreateOption describes whether to delete and recreate an object when an update is required. `IfRequired`
158185 # will recreate the object when updating an immutable field. `Always` will always recreate the object if a mismatch
159186 # is detected. `RecreateOption` has no effect when the `remediationAction` is `inform`. `IfRequired` has no effect
@@ -183,9 +210,15 @@ policyDefaults:
183210 # part of a policy set. Use this setting to turn off placement generation for policies not in policy sets. This
184211 # defaults to "true".
185212 generatePolicyPlacement : true
213+ # Optional. Whether to generate the selective enforcement Placement and PlacementBinding when enforcementPlacement is
214+ # configured. Generation occurs except when policies are part of a policy set. Use this setting to turn off the
215+ # enforcement binding path for policies not in policy sets. This is independent from generatePolicyPlacement. This
216+ # defaults to "true".
217+ generatePolicyEnforcementPlacement : true
186218 # Optional. When a policy is part of a policy set, by default the generator will not generate the placement for this
187219 # policy since a placement is generated for the policy set. If a placement should still be generated, set it to "true"
188- # so that the policy will be deployed with both policy placement and policy set placement. This defaults to "false".
220+ # so that the policy will be deployed with both policy placement and policy set placement. This applies to both the
221+ # primary placement and the optional selective enforcement placement. This defaults to "false".
189222 generatePlacementWhenInSet : false
190223 # Optional. Annotations that the policy will include under its metadata.annotations. It will be applied for all
191224 # policies unless specified in the policy.
@@ -204,8 +237,17 @@ policySetDefaults:
204237 # all clusters. If a placement.name is not provided here for placement consolidation, it will fall back to
205238 # policyDefaults.placement.name, if provided there. (See policyDefaults.placement for description.)
206239 placement : {}
240+ # Optional. The placement configuration for the selective enforcement binding of the policy sets. This defaults to
241+ # unset. If an enforcementPlacement.name is not provided here for placement consolidation, it will fall back to
242+ # policyDefaults.enforcementPlacement.name, if provided there. (See policyDefaults.enforcementPlacement for
243+ # description.)
244+ enforcementPlacement : {}
207245 # Optional. Whether to generate placement manifests for policy sets. This defaults to "true".
208246 generatePolicySetPlacement : true
247+ # Optional. Whether to generate the selective enforcement Placement and PlacementBinding for policy sets when
248+ # enforcementPlacement is configured. Use this setting to turn off the enforcement binding path for policy sets.
249+ # This is independent from generatePolicySetPlacement. This defaults to "true".
250+ generatePolicySetEnforcementPlacement : true
209251
210252# Required. The list of policies to create along with overrides to either the default values or, if set, the values
211253# given in policyDefaults.
@@ -349,6 +391,8 @@ policies:
349391 orderManifests : false
350392 # Optional. (See policyDefaults.placement for description.)
351393 placement : {}
394+ # Optional. (See policyDefaults.enforcementPlacement for description.)
395+ enforcementPlacement : {}
352396 # Optional. (See policyDefaults.remediationAction for description.)
353397 remediationAction : " "
354398 # Optional. (See policyDefaults.recreateOption for description.)
@@ -364,6 +408,8 @@ policies:
364408 policySets : []
365409 # Optional. (See policyDefaults.generatePolicyPlacement for description.)
366410 generatePolicyPlacement : true
411+ # Optional. (See policyDefaults.generatePolicyEnforcementPlacement for description.)
412+ generatePolicyEnforcementPlacement : true
367413 # Optional. (See policyDefaults.generatePlacementWhenInSet for description.)
368414 generatePlacementWhenInSet : false
369415 # Optional. Annotations that the policy will include under its metadata.annotations. It will overwrite the
@@ -387,5 +433,10 @@ policySets:
387433 # Optional. (See policySetDefaults.placement to set a default placement for policy sets. See
388434 # policyDefaults.placement for description of placement options.)
389435 placement : {}
436+ # Optional. (See policySetDefaults.enforcementPlacement to set a default selective enforcement placement for policy
437+ # sets. See policyDefaults.enforcementPlacement for description of placement options.)
438+ enforcementPlacement : {}
390439 # Optional. (See policySetDefaults.generatePolicySetPlacement for description.)
391440 generatePolicySetPlacement : true
441+ # Optional. (See policySetDefaults.generatePolicySetEnforcementPlacement for description.)
442+ generatePolicySetEnforcementPlacement : true
0 commit comments