1
0
Fork 0
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:
belyshevdenis 2019-03-12 14:42:24 +02:00
parent c7ebbc2def
commit 6845b48068
2 changed files with 11 additions and 1 deletions

View file

@ -15,4 +15,13 @@ spec:
singular: policy
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
properties:
failurePolicy:
type: string
enum:
- continueOnError
- stopOnError

View file

@ -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"`