mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 08:01:52 +02:00
don't be too hard to 9.5
This commit is contained in:
@@ -504,6 +504,9 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||
"version": {
|
||||
Type: "string",
|
||||
Enum: []apiextv1.JSON{
|
||||
{
|
||||
Raw: []byte(`"9.5"`),
|
||||
},
|
||||
{
|
||||
Raw: []byte(`"9.6"`),
|
||||
},
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
// VersionMap Map of version numbers
|
||||
var VersionMap = map[string]int{
|
||||
"9.5": 90500,
|
||||
"9.6": 90600,
|
||||
"10": 100000,
|
||||
"11": 110000,
|
||||
@@ -33,7 +34,7 @@ func (c *Cluster) GetDesiredMajorVersionAsInt() int {
|
||||
func (c *Cluster) GetDesiredMajorVersion() string {
|
||||
|
||||
if c.Config.OpConfig.MajorVersionUpgradeMode == "full" {
|
||||
// current is 9.6, minimal is 11 allowing 11 to 14 clusters, everything below is upgraded
|
||||
// e.g. current is 9.6, minimal is 11 allowing 11 to 14 clusters, everything below is upgraded
|
||||
if IsBiggerPostgresVersion(c.Spec.PgVersion, c.Config.OpConfig.MinimalMajorVersion) {
|
||||
c.logger.Infof("overwriting configured major version %s to %s", c.Spec.PgVersion, c.Config.OpConfig.TargetMajorVersion)
|
||||
return c.Config.OpConfig.TargetMajorVersion
|
||||
|
||||
Reference in New Issue
Block a user