diff --git a/api/v1beta1/policyautomation_types.go b/api/v1beta1/policyautomation_types.go index a15cb14d..0c5775b8 100644 --- a/api/v1beta1/policyautomation_types.go +++ b/api/v1beta1/policyautomation_types.go @@ -68,7 +68,7 @@ type PolicyAutomationSpec struct { // "noncompliant". // // +kubebuilder:validation:Enum={noncompliant} - // +kubebuilder:validation:Required + // +kubebuilder:default=noncompliant EventHook string `json:"eventHook,omitempty"` // RescanAfter is reserved for future use and should not be set. diff --git a/deploy/crds/policy.open-cluster-management.io_policyautomations.yaml b/deploy/crds/policy.open-cluster-management.io_policyautomations.yaml index 07aa3116..6386db48 100644 --- a/deploy/crds/policy.open-cluster-management.io_policyautomations.yaml +++ b/deploy/crds/policy.open-cluster-management.io_policyautomations.yaml @@ -91,6 +91,7 @@ spec: minimum: 0 type: integer eventHook: + default: noncompliant description: >- EventHook specifies the compliance state that initiates automation. This must be set to "noncompliant". @@ -116,7 +117,6 @@ spec: type: string required: - automationDef - - eventHook - mode - policyRef type: object