mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 02:45:06 +00:00
Fix condition for rolling update (#2930)
This commit is contained in:
parent
7ceba594b2
commit
4410b6adc3
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ func ReadRootCASecret(restConfig *rest.Config, client *client.Client) (result []
|
|||
managedByKyverno = label == "kyverno"
|
||||
}
|
||||
deplHashSec, ok = stlsca.GetAnnotations()[MasterDeploymentUID]
|
||||
if managedByKyverno && (!ok || deplHashSec != deplHash) {
|
||||
if managedByKyverno && (ok && deplHashSec != deplHash) {
|
||||
return nil, fmt.Errorf("outdated secret")
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ func ReadTLSPair(restConfig *rest.Config, client *client.Client) (*PemPair, erro
|
|||
managedByKyverno = label == "kyverno"
|
||||
}
|
||||
deplHashSec, ok = unstrSecret.GetAnnotations()[MasterDeploymentUID]
|
||||
if managedByKyverno && (!ok || deplHashSec != deplHash) {
|
||||
if managedByKyverno && (ok && deplHashSec != deplHash) {
|
||||
return nil, fmt.Errorf("outdated secret")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue