diff --git a/api/kyverno/v1/spec_types.go b/api/kyverno/v1/spec_types.go index f215a82eaae8..e89dec66425f 100644 --- a/api/kyverno/v1/spec_types.go +++ b/api/kyverno/v1/spec_types.go @@ -48,10 +48,10 @@ type Spec struct { // ValidationFailureAction defines if a validation policy rule violation should block // the admission review request (enforce), or allow (audit) the admission review request // and report an error in a policy report. Optional. - // Allowed values are audit or enforce. The default value is "audit". + // Allowed values are audit or enforce. + // The default value is "" which means policy will be executed in background-only mode. // +optional - // +kubebuilder:validation:Enum=audit;enforce - // +kubebuilder:default=audit + // +kubebuilder:validation:Enum=audit;enforce;"" ValidationFailureAction ValidationFailureAction `json:"validationFailureAction,omitempty" yaml:"validationFailureAction,omitempty"` // ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction diff --git a/api/kyverno/v2beta1/spec_types.go b/api/kyverno/v2beta1/spec_types.go index 10e6538be358..c8f4e7c89e99 100644 --- a/api/kyverno/v2beta1/spec_types.go +++ b/api/kyverno/v2beta1/spec_types.go @@ -30,10 +30,10 @@ type Spec struct { // ValidationFailureAction defines if a validation policy rule violation should block // the admission review request (enforce), or allow (audit) the admission review request // and report an error in a policy report. Optional. - // Allowed values are audit or enforce. The default value is "audit". + // Allowed values are audit or enforce. + // The default value is "" which means policy will be executed in background-only mode. // +optional - // +kubebuilder:validation:Enum=audit;enforce - // +kubebuilder:default=audit + // +kubebuilder:validation:Enum=audit;enforce;"" ValidationFailureAction kyvernov1.ValidationFailureAction `json:"validationFailureAction,omitempty" yaml:"validationFailureAction,omitempty"` // ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction diff --git a/charts/kyverno/templates/crds.yaml b/charts/kyverno/templates/crds.yaml index f3b554c8e2b3..82d3471a16ea 100644 --- a/charts/kyverno/templates/crds.yaml +++ b/charts/kyverno/templates/crds.yaml @@ -2811,11 +2811,11 @@ spec: description: SchemaValidation skips policy validation checks. Optional. The default value is set to "true", it must be set to "false" to disable the validation checks. type: boolean validationFailureAction: - default: audit - description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "audit". + description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "" which means policy will be executed in background-only mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces. @@ -6294,11 +6294,11 @@ spec: description: SchemaValidation skips policy validation checks. Optional. The default value is set to "true", it must be set to "false" to disable the validation checks. type: boolean validationFailureAction: - default: audit - description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "audit". + description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "" which means policy will be executed in background-only mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces. @@ -10401,11 +10401,11 @@ spec: description: SchemaValidation skips policy validation checks. Optional. The default value is set to "true", it must be set to "false" to disable the validation checks. type: boolean validationFailureAction: - default: audit - description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "audit". + description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "" which means policy will be executed in background-only mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces. @@ -13884,11 +13884,11 @@ spec: description: SchemaValidation skips policy validation checks. Optional. The default value is set to "true", it must be set to "false" to disable the validation checks. type: boolean validationFailureAction: - default: audit - description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "audit". + description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is "" which means policy will be executed in background-only mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces. diff --git a/config/crds/kyverno.io_clusterpolicies.yaml b/config/crds/kyverno.io_clusterpolicies.yaml index 49a3910bc4b7..52304ac23fc9 100644 --- a/config/crds/kyverno.io_clusterpolicies.yaml +++ b/config/crds/kyverno.io_clusterpolicies.yaml @@ -2867,15 +2867,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -8449,15 +8450,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy diff --git a/config/crds/kyverno.io_policies.yaml b/config/crds/kyverno.io_policies.yaml index 87c05ffd0c80..0ac8289f160d 100644 --- a/config/crds/kyverno.io_policies.yaml +++ b/config/crds/kyverno.io_policies.yaml @@ -2868,15 +2868,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -8452,15 +8453,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy diff --git a/config/install.yaml b/config/install.yaml index 1019c0d5d0d5..cc4d477dc895 100644 --- a/config/install.yaml +++ b/config/install.yaml @@ -4189,15 +4189,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -9771,15 +9772,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -16210,15 +16212,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -21794,15 +21797,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy diff --git a/config/install_debug.yaml b/config/install_debug.yaml index 2e5b788140ee..5db6699f6c4b 100644 --- a/config/install_debug.yaml +++ b/config/install_debug.yaml @@ -4183,15 +4183,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -9765,15 +9766,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -16201,15 +16203,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy @@ -21785,15 +21788,16 @@ spec: disable the validation checks. type: boolean validationFailureAction: - default: audit description: ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. - The default value is "audit". + The default value is "" which means policy will be executed in background-only + mode. enum: - audit - enforce + - "" type: string validationFailureActionOverrides: description: ValidationFailureActionOverrides is a Cluster Policy diff --git a/docs/user/crd/index.html b/docs/user/crd/index.html index 79e951e4c10d..48db048e8f04 100644 --- a/docs/user/crd/index.html +++ b/docs/user/crd/index.html @@ -164,7 +164,8 @@
ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. -Allowed values are audit or enforce. The default value is “audit”.
+Allowed values are audit or enforce. +The default value is “” which means policy will be executed in background-only mode.ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. -Allowed values are audit or enforce. The default value is “audit”.
+Allowed values are audit or enforce. +The default value is “” which means policy will be executed in background-only mode.ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. -Allowed values are audit or enforce. The default value is “audit”.
+Allowed values are audit or enforce. +The default value is “” which means policy will be executed in background-only mode.ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. -Allowed values are audit or enforce. The default value is “audit”.
+Allowed values are audit or enforce. +The default value is “” which means policy will be executed in background-only mode.ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. -Allowed values are audit or enforce. The default value is “audit”.
+Allowed values are audit or enforce. +The default value is “” which means policy will be executed in background-only mode.ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. -Allowed values are audit or enforce. The default value is “audit”.
+Allowed values are audit or enforce. +The default value is “” which means policy will be executed in background-only mode.