Skip to content

Commit a12131d

Browse files
Sync CRDs
Signed-off-by: Justin Kulikauskas <[email protected]>
1 parent 8aa8a15 commit a12131d

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

pkg/addon/configpolicy/manifests/managedclusterchart/templates/policy.open-cluster-management.io_configurationpolicies_crd.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ spec:
4444
description: >-
4545
ConfigurationPolicySpec defines the desired configuration of objects on the cluster, along with how the controller should handle when the cluster doesn't match the configuration policy.
4646
properties:
47+
customMessage:
48+
description: >-
49+
CustomMessage configures the compliance messages emitted by the configuration policy, to use one of the specified Go templates based on the current compliance. The data passed to the templates include a `.DefaultMessage` string variable which matches the message that would be emitted if no custom template was defined, and a `.Policy` object variable which contains the full current state of the policy. If the policy is using Kubernetes API watches (default but can be configured with EvaluationInterval), and the object exists, then the full state of each related object will be available at `.Policy.status.relatedObjects[*].object`. Otherwise, only the identifier information will be available there.
50+
properties:
51+
compliant:
52+
description: Compliant is the template used for the compliance message when the policy is compliant.
53+
type: string
54+
noncompliant:
55+
description: >-
56+
NonCompliant is the template used for the compliance message when the policy is not compliant, including when the status is unknown.
57+
type: string
58+
type: object
4759
evaluationInterval:
4860
description: >-
4961
EvaluationInterval configures the minimum elapsed time before a configuration policy is reevaluated. The default value is `watch` to leverage Kubernetes API watches instead of polling the Kubernetes API server. If the policy spec is changed or if the list of namespaces selected by the policy changes, the policy might be evaluated regardless of the settings here.
@@ -373,6 +385,18 @@ spec:
373385
- required:
374386
- object-templates-raw
375387
properties:
388+
customMessage:
389+
description: >-
390+
CustomMessage configures the compliance messages emitted by the configuration policy, to use one of the specified Go templates based on the current compliance. The data passed to the templates include a `.DefaultMessage` string variable which matches the message that would be emitted if no custom template was defined, and a `.Policy` object variable which contains the full current state of the policy. If the policy is using Kubernetes API watches (default but can be configured with EvaluationInterval), and the object exists, then the full state of each related object will be available at `.Policy.status.relatedObjects[*].object`. Otherwise, only the identifier information will be available there.
391+
properties:
392+
compliant:
393+
description: Compliant is the template used for the compliance message when the policy is compliant.
394+
type: string
395+
noncompliant:
396+
description: >-
397+
NonCompliant is the template used for the compliance message when the policy is not compliant, including when the status is unknown.
398+
type: string
399+
type: object
376400
evaluationInterval:
377401
description: >-
378402
EvaluationInterval configures the minimum elapsed time before a configuration policy is reevaluated. The default value is `watch` to leverage Kubernetes API watches instead of polling the Kubernetes API server. If the policy spec is changed or if the list of namespaces selected by the policy changes, the policy might be evaluated regardless of the settings here.

pkg/addon/configpolicy/manifests/managedclusterchart/templates/policy.open-cluster-management.io_operatorpolicies_crd.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ spec:
7171
type: object
7272
complianceType:
7373
description: >-
74-
ComplianceType describes how objects on the cluster should be compared with the object definition of the configuration policy. The supported options are `MustHave`, `MustOnlyHave`, or `MustNotHave`.
74+
ComplianceType specifies the desired state of the operator on the cluster. If set to `musthave`, the policy is compliant when the operator is found. If set to `mustnothave`, the policy is compliant when the operator is not found.
7575
enum:
7676
- musthave
7777
- mustnothave
@@ -249,6 +249,10 @@ spec:
249249
x-kubernetes-list-map-keys:
250250
- type
251251
x-kubernetes-list-type: map
252+
observedGeneration:
253+
description: ObservedGeneration is the latest generation observed by the controller.
254+
format: int64
255+
type: integer
252256
overlappingPolicies:
253257
description: >-
254258
The list of overlapping OperatorPolicies (as name.namespace) which all manage the same subscription, including this policy. When no overlapping is detected, this list will be empty.

0 commit comments

Comments
 (0)