mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 16:24:19 +02:00
Defaults for user/schema fix
Verify the defaul values only if the schema doesn't override them.
This commit is contained in:
@@ -1316,7 +1316,7 @@ func (c *Cluster) needSyncConnPoolDefaults(
|
||||
}
|
||||
|
||||
for _, env := range poolContainer.Env {
|
||||
if env.Name == "PGUSER" {
|
||||
if spec.User == "" && env.Name == "PGUSER" {
|
||||
ref := env.ValueFrom.SecretKeyRef.LocalObjectReference
|
||||
|
||||
if ref.Name != c.credentialSecretName(config.User) {
|
||||
@@ -1327,7 +1327,7 @@ func (c *Cluster) needSyncConnPoolDefaults(
|
||||
}
|
||||
}
|
||||
|
||||
if env.Name == "PGSCHEMA" && env.Value != config.Schema {
|
||||
if spec.Schema == "" && env.Name == "PGSCHEMA" && env.Value != config.Schema {
|
||||
sync = true
|
||||
msg := fmt.Sprintf("Pool schema is different (having %s, required %s)",
|
||||
env.Value, config.Schema)
|
||||
|
||||
Reference in New Issue
Block a user