Fix secrets sync

* log if secret already exists
This commit is contained in:
Murat Kabilov
2017-05-12 11:41:30 +02:00
parent 8268b07ad2
commit ee83e196a9
3 changed files with 27 additions and 7 deletions
+1
View File
@@ -248,6 +248,7 @@ func (c *Cluster) applySecrets() error {
if err != nil {
return fmt.Errorf("Can't get current Secret: %s", err)
}
c.logger.Debugf("Secret '%s' already exists, fetching it's password", util.NameFromMeta(secret.ObjectMeta))
pwdUser := c.pgUsers[secretUsername]
pwdUser.Password = string(curSecrets.Data["password"])
c.pgUsers[secretUsername] = pwdUser