mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-09 15:56:03 +02:00
do not rotate secrets for standby clusters (#2175)
This commit is contained in:
+1
-1
@@ -759,7 +759,7 @@ func (c *Cluster) updateSecret(
|
|||||||
|
|
||||||
// globally enabled rotation is only allowed for manifest and bootstrapped roles
|
// globally enabled rotation is only allowed for manifest and bootstrapped roles
|
||||||
allowedRoleTypes := []spec.RoleOrigin{spec.RoleOriginManifest, spec.RoleOriginBootstrap}
|
allowedRoleTypes := []spec.RoleOrigin{spec.RoleOriginManifest, spec.RoleOriginBootstrap}
|
||||||
rotationAllowed := !pwdUser.IsDbOwner && util.SliceContains(allowedRoleTypes, pwdUser.Origin)
|
rotationAllowed := !pwdUser.IsDbOwner && util.SliceContains(allowedRoleTypes, pwdUser.Origin) && c.Spec.StandbyCluster == nil
|
||||||
|
|
||||||
if (c.OpConfig.EnablePasswordRotation && rotationAllowed) || rotationEnabledInManifest {
|
if (c.OpConfig.EnablePasswordRotation && rotationAllowed) || rotationEnabledInManifest {
|
||||||
updateSecretMsg, err = c.rotatePasswordInSecret(secret, secretUsername, pwdUser.Origin, currentTime, retentionUsers)
|
updateSecretMsg, err = c.rotatePasswordInSecret(secret, secretUsername, pwdUser.Origin, currentTime, retentionUsers)
|
||||||
|
|||||||
Reference in New Issue
Block a user