Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/policies.kyverno.io/v1alpha1/policy_exception.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ type PolicyRef struct {

// Kind is the kind of the policy
Kind string `json:"kind"`

// ValidationAction overrides the policy's validation action when set
// +optional
// +kubebuilder:validation:Enum=Deny;Audit;Warn
ValidationAction admissionregistrationv1.ValidationAction `json:"validationAction,omitempty"`
}

func (p *PolicyRef) Validate(path *field.Path) (errs field.ErrorList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down Expand Up @@ -253,6 +261,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down Expand Up @@ -387,6 +403,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down
24 changes: 24 additions & 0 deletions config/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32083,6 +32083,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down Expand Up @@ -32218,6 +32226,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down Expand Up @@ -32352,6 +32368,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down
24 changes: 24 additions & 0 deletions config/crds/policies.kyverno.io_policyexceptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down Expand Up @@ -251,6 +259,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down Expand Up @@ -385,6 +401,14 @@ spec:
name:
description: Name is the name of the policy
type: string
validationAction:
description: ValidationAction overrides the policy's validation
action when set
enum:
- Deny
- Audit
- Warn
type: string
required:
- kind
- name
Expand Down
14 changes: 14 additions & 0 deletions docs/user/crd/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6696,6 +6696,20 @@ <h3 id="policies.kyverno.io/v1alpha1.PolicyRef">PolicyRef
<p>Kind is the kind of the policy</p>
</td>
</tr>
<tr>
<td>
<code>validationAction</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#validationaction-v1-admissionregistration">
Kubernetes admissionregistration/v1.ValidationAction
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>ValidationAction overrides the policy&rsquo;s validation action when set</p>
</td>
</tr>
</tbody>
</table>
<hr />
Expand Down
29 changes: 29 additions & 0 deletions docs/user/crd/kyverno_cel_policies.v1alpha1.html
Original file line number Diff line number Diff line change
Expand Up @@ -8814,6 +8814,35 @@ <H3 id="policies-kyverno-io-v1alpha1-PolicyRef">PolicyRef
</tr>




<tr>
<td><code>validationAction</code>

</br>




<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#validationaction-v1-admissionregistration">
<span style="font-family: monospace">admissionregistration/v1.ValidationAction</span>
</a>


</td>
<td>


<p>ValidationAction overrides the policy's validation action when set</p>





</td>
</tr>




</tbody>
Expand Down