Remove all secrets on delete incl. pooler (#1091)

* fix syncSecrets and remove pooler secret

* update log for deleteSecret

* use c.credentialSecretName(username)

* minor fix
This commit is contained in:
Felix Kunde
2020-08-10 18:26:26 +02:00
committed by GitHub
parent 43163cf83b
commit 0508266219
5 changed files with 39 additions and 11 deletions
+1
View File
@@ -500,6 +500,7 @@ func (c *Cluster) syncSecrets() error {
c.logger.Warningf("secret %q does not contain the role %q", secretSpec.Name, secretUsername)
continue
}
c.Secrets[secret.UID] = secret
c.logger.Debugf("secret %q already exists, fetching its password", util.NameFromMeta(secret.ObjectMeta))
if secretUsername == c.systemUsers[constants.SuperuserKeyName].Name {
secretUsername = constants.SuperuserKeyName