Defaults for user/schema fix
Verify the defaul values only if the schema doesn't override them.
This commit is contained in:
		
							parent
							
								
									48cdbb6a65
								
							
						
					
					
						commit
						20b2fb4642
					
				|  | @ -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) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue