From 7b91e6d2f5d2884d828c972ee493cf51e0a20a0b Mon Sep 17 00:00:00 2001 From: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:54:40 -0400 Subject: [PATCH] Remove requirement for `eventHook` in automation ref: https://issues.redhat.com/browse/ACM-14657 Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com> --- api/v1beta1/policyautomation_types.go | 2 +- .../policy.open-cluster-management.io_policyautomations.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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