1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 18:38:40 +00:00

Made mutation, validation, generation and overlay optional due to the specs

This commit is contained in:
Maxim Goncharenko 2019-05-13 21:18:02 +03:00
parent f2e89ca993
commit 8fea251837

View file

@ -25,9 +25,9 @@ type Spec struct {
type Rule struct {
Name string `json:"name"`
ResourceDescription `json:"resource"`
Mutation `json:"mutate"`
Validation `json:"validate"`
Generation `json:"generate"`
Mutation *Mutation `json:"mutate"`
Validation *Validation `json:"validate"`
Generation *Generation `json:"generate"`
}
// ResourceDescription describes the resource to which the PolicyRule will be applied.
@ -39,8 +39,8 @@ type ResourceDescription struct {
// Mutation describes the way how Mutating Webhook will react on resource creation
type Mutation struct {
Overlay interface{} `json:"overlay"`
Patches []Patch `json:"patches"`
Overlay *interface{} `json:"overlay"`
Patches []Patch `json:"patches"`
}
// +k8s:deepcopy-gen=false