use correct keys in updateSecret (#2029)

This commit is contained in:
Felix Kunde
2022-09-01 10:58:42 +02:00
committed by GitHub
parent 4c07494ac7
commit d209612b18
3 changed files with 35 additions and 7 deletions
+2 -2
View File
@@ -723,14 +723,14 @@ func (c *Cluster) updateSecret(
// use system user when pooler is enabled and pooler user is specfied in manifest
if _, exists := c.systemUsers[constants.ConnectionPoolerUserKeyName]; exists {
if secretUsername == c.systemUsers[constants.ConnectionPoolerUserKeyName].Name {
userKey = constants.ConnectionPoolerUserName
userKey = constants.ConnectionPoolerUserKeyName
userMap = c.systemUsers
}
}
// use system user when streams are defined and fes_user is specfied in manifest
if _, exists := c.systemUsers[constants.EventStreamUserKeyName]; exists {
if secretUsername == c.systemUsers[constants.EventStreamUserKeyName].Name {
userKey = fmt.Sprintf("%s%s", constants.EventStreamSourceSlotPrefix, constants.UserRoleNameSuffix)
userKey = constants.EventStreamUserKeyName
userMap = c.systemUsers
}
}