mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: policy status updates not stabilising (#11236)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
1331209b19
commit
82f4ca9034
1 changed files with 17 additions and 13 deletions
|
@ -157,6 +157,7 @@ func generateRule(name string, rule *kyvernov1.Rule, tplKey, shift string, kinds
|
|||
Deny: rule.Validation.Deny,
|
||||
FailureAction: rule.Validation.FailureAction,
|
||||
FailureActionOverrides: rule.Validation.FailureActionOverrides,
|
||||
AllowExistingViolations: rule.Validation.AllowExistingViolations,
|
||||
}
|
||||
rule.Validation = deny
|
||||
return rule
|
||||
|
@ -173,6 +174,7 @@ func generateRule(name string, rule *kyvernov1.Rule, tplKey, shift string, kinds
|
|||
},
|
||||
FailureAction: rule.Validation.FailureAction,
|
||||
FailureActionOverrides: rule.Validation.FailureActionOverrides,
|
||||
AllowExistingViolations: rule.Validation.AllowExistingViolations,
|
||||
}
|
||||
rule.Validation = podSecurity
|
||||
return rule
|
||||
|
@ -197,6 +199,7 @@ func generateRule(name string, rule *kyvernov1.Rule, tplKey, shift string, kinds
|
|||
Message: variables.FindAndShiftReferences(logger, rule.Validation.Message, shift, "anyPattern"),
|
||||
FailureAction: failureAction,
|
||||
FailureActionOverrides: failureActionOverrides,
|
||||
AllowExistingViolations: rule.Validation.AllowExistingViolations,
|
||||
}
|
||||
rule.Validation.SetAnyPattern(patterns)
|
||||
return rule
|
||||
|
@ -211,6 +214,7 @@ func generateRule(name string, rule *kyvernov1.Rule, tplKey, shift string, kinds
|
|||
ForEachValidation: newForeachValidate,
|
||||
FailureAction: failureAction,
|
||||
FailureActionOverrides: failureActionOverrides,
|
||||
AllowExistingViolations: rule.Validation.AllowExistingViolations,
|
||||
}
|
||||
return rule
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue