mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-08 10:04:25 +00:00
fix pod controller annotation to "none"
This commit is contained in:
parent
77955ff212
commit
9194251a38
2 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@ func defaultvalidationFailureAction(policy *kyverno.ClusterPolicy) ([]byte, stri
|
|||
// scenario A: not exist, set default to "all", which generates on all pod controllers
|
||||
// - if name / selector exist in resource description -> skip
|
||||
// as these fields may not be applicable to pod controllers
|
||||
// scenario B: "null", user explicitely disable this feature -> skip
|
||||
// scenario B: "none", user explicitely disable this feature -> skip
|
||||
// scenario C: some certain controllers that user set -> generate on defined controllers
|
||||
// copy entrie match / exclude block, it's users' responsibility to
|
||||
// make sure all fields are applicable to pod cotrollers
|
||||
|
@ -127,7 +127,7 @@ func generatePodControllerRule(policy kyverno.ClusterPolicy) (patches [][]byte,
|
|||
}
|
||||
|
||||
// scenario B
|
||||
if controllers == "null" {
|
||||
if controllers == "none" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ func TestGeneratePodControllerRule_DisableFeature(t *testing.T) {
|
|||
"metadata": {
|
||||
"annotations": {
|
||||
"a": "b",
|
||||
"pod-policies.kyverno.io/autogen-controllers": "null"
|
||||
"pod-policies.kyverno.io/autogen-controllers": "none"
|
||||
},
|
||||
"name": "add-safe-to-evict"
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue