Configure proper PGVERSION for Pod.

This commit is contained in:
Jan Mußler 2021-02-18 22:26:53 +01:00
parent fe465cf492
commit c6d7cb5ed5
1 changed files with 1 additions and 1 deletions

View File

@ -731,7 +731,7 @@ func (c *Cluster) generateSpiloPodEnvVars(uid types.UID, spiloConfiguration stri
},
}
if c.OpConfig.EnablePgVersionEnvVar {
envVars = append(envVars, v1.EnvVar{Name: "PGVERSION", Value: c.Spec.PgVersion})
envVars = append(envVars, v1.EnvVar{Name: "PGVERSION", Value: c.GetDesiredMajorVersion()})
}
// Spilo expects cluster labels as JSON
if clusterLabels, err := json.Marshal(labels.Set(c.OpConfig.ClusterLabels)); err != nil {