mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 07:26:55 +00:00
NK-31: Implemented validation of failurePolicy field.
This commit is contained in:
parent
c7ebbc2def
commit
6845b48068
2 changed files with 11 additions and 1 deletions
11
crd/crd.yaml
11
crd/crd.yaml
|
@ -15,4 +15,13 @@ spec:
|
|||
singular: policy
|
||||
subresources:
|
||||
status: {}
|
||||
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
failurePolicy:
|
||||
type: string
|
||||
enum:
|
||||
- continueOnError
|
||||
- stopOnError
|
||||
|
|
|
@ -17,6 +17,7 @@ type Policy struct {
|
|||
}
|
||||
|
||||
// Specification of the Policy.
|
||||
// failurePolicy can have values "continueOnError" and "stopOnError" (default).
|
||||
type PolicySpec struct {
|
||||
FailurePolicy *string `json:"failurePolicy"`
|
||||
Rules []PolicyRule `json:"rules"`
|
||||
|
|
Loading…
Add table
Reference in a new issue