1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-09 10:42:22 +00:00

chore: rename exclude into match in policy exception (#5681)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-12-14 01:18:27 +01:00 committed by GitHub
parent 3bd1f82d2e
commit fdce9d92dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 19 deletions

View file

@ -38,12 +38,14 @@ type PolicyException struct {
// PolicyExceptionSpec stores policy exception spec
type PolicyExceptionSpec struct {
Exclude kyvernov2beta1.MatchResources `json:"exclude"`
// Match defines match clause used to check if a resource applies to the exception
Match kyvernov2beta1.MatchResources `json:"match"`
// Exceptions is a list policy/rules to be excluded
Exceptions []Exception `json:"exceptions"`
}
// Exception stores infos about a policy and rules
type Exception struct {
// PolicyName identifies the policy to which the exception is applied.
PolicyName string `json:"policyName"`

View file

@ -274,7 +274,7 @@ func (in *PolicyExceptionList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PolicyExceptionSpec) DeepCopyInto(out *PolicyExceptionSpec) {
*out = *in
in.Exclude.DeepCopyInto(&out.Exclude)
in.Match.DeepCopyInto(&out.Match)
if in.Exceptions != nil {
in, out := &in.Exceptions, &out.Exceptions
*out = make([]Exception, len(*in))

View file

@ -18253,6 +18253,7 @@ spec:
exceptions:
description: Exceptions is a list policy/rules to be excluded
items:
description: Exception stores infos about a policy and rules
properties:
policyName:
description: PolicyName identifies the policy to which the exception is applied.
@ -18267,8 +18268,8 @@ spec:
- ruleNames
type: object
type: array
exclude:
description: MatchResources is used to specify resource and admission review request data for which a policy rule is applicable.
match:
description: Match defines match clause used to check if a resource applies to the exception
properties:
all:
description: All allows specifying resources which will be ANDed
@ -18531,7 +18532,7 @@ spec:
type: object
required:
- exceptions
- exclude
- match
type: object
required:
- spec

View file

@ -43,6 +43,7 @@ spec:
exceptions:
description: Exceptions is a list policy/rules to be excluded
items:
description: Exception stores infos about a policy and rules
properties:
policyName:
description: PolicyName identifies the policy to which the exception
@ -59,9 +60,9 @@ spec:
- ruleNames
type: object
type: array
exclude:
description: MatchResources is used to specify resource and admission
review request data for which a policy rule is applicable.
match:
description: Match defines match clause used to check if a resource
applies to the exception
properties:
all:
description: All allows specifying resources which will be ANDed
@ -472,7 +473,7 @@ spec:
type: object
required:
- exceptions
- exclude
- match
type: object
required:
- spec

View file

@ -28800,6 +28800,7 @@ spec:
exceptions:
description: Exceptions is a list policy/rules to be excluded
items:
description: Exception stores infos about a policy and rules
properties:
policyName:
description: PolicyName identifies the policy to which the exception
@ -28816,9 +28817,9 @@ spec:
- ruleNames
type: object
type: array
exclude:
description: MatchResources is used to specify resource and admission
review request data for which a policy rule is applicable.
match:
description: Match defines match clause used to check if a resource
applies to the exception
properties:
all:
description: All allows specifying resources which will be ANDed
@ -29229,7 +29230,7 @@ spec:
type: object
required:
- exceptions
- exclude
- match
type: object
required:
- spec

View file

@ -28788,6 +28788,7 @@ spec:
exceptions:
description: Exceptions is a list policy/rules to be excluded
items:
description: Exception stores infos about a policy and rules
properties:
policyName:
description: PolicyName identifies the policy to which the exception
@ -28804,9 +28805,9 @@ spec:
- ruleNames
type: object
type: array
exclude:
description: MatchResources is used to specify resource and admission
review request data for which a policy rule is applicable.
match:
description: Match defines match clause used to check if a resource
applies to the exception
properties:
all:
description: All allows specifying resources which will be ANDed
@ -29217,7 +29218,7 @@ spec:
type: object
required:
- exceptions
- exclude
- match
type: object
required:
- spec

View file

@ -5312,7 +5312,7 @@ PolicyExceptionSpec
<table class="table table-striped">
<tr>
<td>
<code>exclude</code><br/>
<code>match</code><br/>
<em>
<a href="#kyverno.io/v2beta1.MatchResources">
MatchResources
@ -5320,6 +5320,7 @@ MatchResources
</em>
</td>
<td>
<p>Match defines match clause used to check if a resource applies to the exception</p>
</td>
</tr>
<tr>
@ -5465,6 +5466,7 @@ AnyAllConditions
<a href="#kyverno.io/v2alpha1.PolicyExceptionSpec">PolicyExceptionSpec</a>)
</p>
<p>
<p>Exception stores infos about a policy and rules</p>
</p>
<table class="table table-striped">
<thead class="thead-dark">
@ -5518,7 +5520,7 @@ string
<tbody>
<tr>
<td>
<code>exclude</code><br/>
<code>match</code><br/>
<em>
<a href="#kyverno.io/v2beta1.MatchResources">
MatchResources
@ -5526,6 +5528,7 @@ MatchResources
</em>
</td>
<td>
<p>Match defines match clause used to check if a resource applies to the exception</p>
</td>
</tr>
<tr>