diff --git a/pkg/cluster/connection_pooler.go b/pkg/cluster/connection_pooler.go index 0f4d231f1..41251629c 100644 --- a/pkg/cluster/connection_pooler.go +++ b/pkg/cluster/connection_pooler.go @@ -321,13 +321,13 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) ( envVars = append(envVars, c.getConnectionPoolerEnvVars()...) infraRolesList := make([]string, 0) - for infraRoleName := range c.Config.InfrastructureRoles { + for infraRoleName := range c.InfrastructureRoles { infraRolesList = append(infraRolesList, infraRoleName) } if len(infraRolesList) > 0 { envVars = append(envVars, v1.EnvVar{ - Name: "INFRASTRUCTURE_ROLES_LIST", + Name: "INFRASTRUCTURE_ROLES", Value: strings.Join(infraRolesList, ","), }) }