Skip to content

Commit d4383ba

Browse files
dhaiducekopenshift-merge-robot
authored andcommitted
Add policySetDefaults
Also moves placement validation and applying to helper functions for consistency and maintainability. ref: https://issues.redhat.com/browse/ACM-3003 Signed-off-by: Dale Haiducek <[email protected]>
1 parent f631483 commit d4383ba

File tree

5 files changed

+485
-389
lines changed

5 files changed

+485
-389
lines changed

docs/policygenerator-reference.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ placementBindingDefaults:
1010
# Set an explicit placement binding name to use rather than rely on the default.
1111
name: ""
1212

13-
# Required. Any default value listed here can be overridden under an entry in the policies array except for "namespace".
13+
# Required. Defaults for policy generation. Any default value listed here can be overridden under an entry in the
14+
# policies array except for "namespace".
1415
policyDefaults:
1516
# Optional. Array of categories to be used in the policy.open-cluster-management.io/categories annotation. This
1617
# defaults to ["CM Configuration Management"].
@@ -156,8 +157,14 @@ policyDefaults:
156157
# policies unless specified in the policy.
157158
policyAnnotations: {}
158159

159-
# Required. The list of policies to create along with overrides to either the default values or, if
160-
# set, the values given in policyDefaults.
160+
# Optional. Defaults for policy set generation. Any default value listed here can be overridden under an entry in the
161+
# policySets array.
162+
policySetDefaults:
163+
# Optional. The placement configuration for the policy sets. This defaults to a placement configuration that matches
164+
# all clusters. (See policyDefaults.placement for description.)
165+
placement: {}
166+
# Optional. Whether to generate placement manifests for policy sets. This defaults to "true".
167+
generatePolicySetPlacement: true
161168

162169
# Required. The list of policies to create along with overrides to either the default values or, if set, the values
163170
# given in policyDefaults.
@@ -270,6 +277,8 @@ policies:
270277
- "NIST SP 800-53"
271278
# Optional. (See policyDefaults.policySets for description.)
272279
policySets: []
280+
# Optional. (See policyDefaults.generatePolicyPlacement for description.)
281+
generatePolicyPlacement: true
273282
# Optional. (See policyDefaults.generatePlacementWhenInSet for description.)
274283
generatePlacementWhenInSet: false
275284
# Optional. Annotations that the policy will include under its metadata.annotations. It will overwrite the
@@ -286,6 +295,8 @@ policySets:
286295
# Optional. The list of policies to be included in the policy set. If policies[*].policySets or
287296
# policyDefaults.policySets is also specified, the list is merged.
288297
policies: []
289-
# Optional. The placement configuration for the policy set. This defaults to a placement configuration that matches
290-
# all clusters. (See policyDefaults.placement for description.)
298+
# Optional. (See policySetDefaults.placement to set a default placement for policy sets. See
299+
# policyDefaults.placement for description of placement options.)
291300
placement: {}
301+
# Optional. (See policySetDefaults.generatePolicySetPlacement for description.)
302+
generatePolicySetPlacement: true

0 commit comments

Comments
 (0)