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:
parent
f2e89ca993
commit
8fea251837
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue