1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 07:26:55 +00:00

fix: autoUpdateWebhooks=false causes ClusterPolicy to never be ready (#6374)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-02-23 09:50:39 +01:00 committed by GitHub
parent d5684f6794
commit 9bd506ced8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -436,10 +436,12 @@ func (c *controller) updatePolicyStatuses(ctx context.Context) error {
return err
}
ready := true
for _, set := range c.policyState {
if !set.Has(policyKey) {
ready = false
break
if c.autoUpdateWebhooks {
for _, set := range c.policyState {
if !set.Has(policyKey) {
ready = false
break
}
}
}
status := policy.GetStatus()