mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: make match field required in rule API (#11048)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
e13de2016b
commit
6837483895
15 changed files with 48 additions and 4 deletions
|
@ -59,7 +59,7 @@ type Rule struct {
|
|||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
// and admission review request information like the user name or role.
|
||||
// At least one kind is required.
|
||||
MatchResources MatchResources `json:"match,omitempty"`
|
||||
MatchResources MatchResources `json:"match"`
|
||||
|
||||
// ExcludeResources defines when this policy rule should not be applied. The exclude
|
||||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
|
|
|
@ -210,7 +210,7 @@ type CleanupPolicySpec struct {
|
|||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
// and admission review request information like the user name or role.
|
||||
// At least one kind is required.
|
||||
MatchResources MatchResources `json:"match,omitempty"`
|
||||
MatchResources MatchResources `json:"match"`
|
||||
|
||||
// ExcludeResources defines when cleanuppolicy should not be applied. The exclude
|
||||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
|
|
|
@ -210,7 +210,7 @@ type CleanupPolicySpec struct {
|
|||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
// and admission review request information like the user name or role.
|
||||
// At least one kind is required.
|
||||
MatchResources MatchResources `json:"match,omitempty"`
|
||||
MatchResources MatchResources `json:"match"`
|
||||
|
||||
// ExcludeResources defines when cleanuppolicy should not be applied. The exclude
|
||||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
|
|
|
@ -26,7 +26,7 @@ type Rule struct {
|
|||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
// and admission review request information like the user name or role.
|
||||
// At least one kind is required.
|
||||
MatchResources MatchResources `json:"match,omitempty"`
|
||||
MatchResources MatchResources `json:"match"`
|
||||
|
||||
// ExcludeResources defines when this policy rule should not be applied. The exclude
|
||||
// criteria can include resource information (e.g. kind, name, namespace, labels)
|
||||
|
|
|
@ -1219,6 +1219,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -2487,6 +2488,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
|
|
@ -1219,6 +1219,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -2487,6 +2488,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
|
|
@ -4901,6 +4901,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -9904,6 +9905,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -14607,6 +14609,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19610,6 +19613,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
@ -4902,6 +4902,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -9906,6 +9907,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -14610,6 +14612,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19613,6 +19616,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
@ -4895,6 +4895,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -9898,6 +9899,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -14601,6 +14603,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19604,6 +19607,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
@ -4896,6 +4896,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -9900,6 +9901,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -14604,6 +14606,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19607,6 +19610,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
@ -1213,6 +1213,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -2481,6 +2482,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
|
|
@ -1213,6 +1213,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -2481,6 +2482,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
|
|
@ -4895,6 +4895,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -9898,6 +9899,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -14601,6 +14603,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19604,6 +19607,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
@ -4896,6 +4896,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -9900,6 +9901,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -14604,6 +14606,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19607,6 +19610,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
@ -1412,6 +1412,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -2680,6 +2681,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -3974,6 +3976,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -5242,6 +5245,7 @@ spec:
|
|||
description: The schedule in Cron format
|
||||
type: string
|
||||
required:
|
||||
- match
|
||||
- schedule
|
||||
type: object
|
||||
status:
|
||||
|
@ -10218,6 +10222,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -15221,6 +15226,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -19924,6 +19930,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -24927,6 +24934,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -30191,6 +30199,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -35195,6 +35204,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -39899,6 +39909,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
@ -44902,6 +44913,7 @@ spec:
|
|||
type: object
|
||||
type: array
|
||||
required:
|
||||
- match
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
|
|
Loading…
Reference in a new issue