remove AllowedMajorUpgradeVersions option
This commit is contained in:
parent
3d847b7b2b
commit
5a44ba1f45
|
|
@ -130,13 +130,6 @@ spec:
|
||||||
major_version_upgrade:
|
major_version_upgrade:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
allowed_major_upgrade_versions:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
default:
|
|
||||||
- "12"
|
|
||||||
- "13"
|
|
||||||
major_version_upgrade_mode:
|
major_version_upgrade_mode:
|
||||||
type: string
|
type: string
|
||||||
default: "off"
|
default: "off"
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,6 @@ configUsers:
|
||||||
super_username: postgres
|
super_username: postgres
|
||||||
|
|
||||||
configMajorVersionUpgrade:
|
configMajorVersionUpgrade:
|
||||||
# to allow major version upgrades only to certain Postgres versions
|
|
||||||
allowed_major_upgrade_versions:
|
|
||||||
- "12"
|
|
||||||
- "13"
|
|
||||||
# "off": no upgrade, "manual": manifest triggers action, "full": minimal version violation triggers too
|
# "off": no upgrade, "manual": manifest triggers action, "full": minimal version violation triggers too
|
||||||
major_version_upgrade_mode: "off"
|
major_version_upgrade_mode: "off"
|
||||||
# minimal Postgres major version that will not automatically be upgraded
|
# minimal Postgres major version that will not automatically be upgraded
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,6 @@ configUsers:
|
||||||
super_username: postgres
|
super_username: postgres
|
||||||
|
|
||||||
configMajorVersionUpgrade:
|
configMajorVersionUpgrade:
|
||||||
# to allow major version upgrades only to certain Postgres versions
|
|
||||||
allowed_major_upgrade_versions: "12,13"
|
|
||||||
# "off": no upgrade, "manual": manifest triggers action, "full": minimal version violation triggers too
|
# "off": no upgrade, "manual": manifest triggers action, "full": minimal version violation triggers too
|
||||||
major_version_upgrade_mode: "off"
|
major_version_upgrade_mode: "off"
|
||||||
# minimal Postgres major version that will not automatically be upgraded
|
# minimal Postgres major version that will not automatically be upgraded
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ In-place major version upgrades can be configured to be executed by the
|
||||||
operator with the `major_version_upgrade_mode` option. By default it is set
|
operator with the `major_version_upgrade_mode` option. By default it is set
|
||||||
to `off` which means the cluster version will not change when increased in
|
to `off` which means the cluster version will not change when increased in
|
||||||
the manifest. Still, a rolling update would be triggered updating the
|
the manifest. Still, a rolling update would be triggered updating the
|
||||||
`PGVERSION` variable. But `configure_spilo` will notice the version mismatch
|
`PGVERSION` variable. But Spilo's [`configure_spilo`](https://github.com/zalando/spilo/blob/master/postgres-appliance/scripts/configure_spilo.py)
|
||||||
and start the old version again.
|
script will notice the version mismatch and start the old version again.
|
||||||
|
|
||||||
In this scenario the major version could then be run by a user from within the
|
In this scenario the major version could then be run by a user from within the
|
||||||
master pod. Exec into the container and run:
|
master pod. Exec into the container and run:
|
||||||
|
|
|
||||||
|
|
@ -193,11 +193,6 @@ CRD-configuration, they are grouped under the `major_version_upgrade` key.
|
||||||
which violate the configured allowed `minimal_major_version` when
|
which violate the configured allowed `minimal_major_version` when
|
||||||
`major_version_upgrade_mode` is set to `"full"`. The default is `"13"`.
|
`major_version_upgrade_mode` is set to `"full"`. The default is `"13"`.
|
||||||
|
|
||||||
* **allowed_major_upgrade_versions**
|
|
||||||
Allow major version upgrades only to certain Postgres versions.
|
|
||||||
The default is `["12", "13"]`.
|
|
||||||
|
|
||||||
|
|
||||||
## Kubernetes resources
|
## Kubernetes resources
|
||||||
|
|
||||||
Parameters to configure cluster-related Kubernetes objects created by the
|
Parameters to configure cluster-related Kubernetes objects created by the
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ data:
|
||||||
# additional_pod_capabilities: "SYS_NICE"
|
# additional_pod_capabilities: "SYS_NICE"
|
||||||
# additional_secret_mount: "some-secret-name"
|
# additional_secret_mount: "some-secret-name"
|
||||||
# additional_secret_mount_path: "/some/dir"
|
# additional_secret_mount_path: "/some/dir"
|
||||||
# allowed_major_upgrade_versions: "12,13"
|
|
||||||
api_port: "8080"
|
api_port: "8080"
|
||||||
aws_region: eu-central-1
|
aws_region: eu-central-1
|
||||||
cluster_domain: cluster.local
|
cluster_domain: cluster.local
|
||||||
|
|
|
||||||
|
|
@ -126,13 +126,6 @@ spec:
|
||||||
major_version_upgrade:
|
major_version_upgrade:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
allowed_major_upgrade_versions:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
default:
|
|
||||||
- "12"
|
|
||||||
- "13"
|
|
||||||
major_version_upgrade_mode:
|
major_version_upgrade_mode:
|
||||||
type: string
|
type: string
|
||||||
default: "off"
|
default: "off"
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,6 @@ configuration:
|
||||||
replication_username: standby
|
replication_username: standby
|
||||||
super_username: postgres
|
super_username: postgres
|
||||||
major_version_upgrade:
|
major_version_upgrade:
|
||||||
allowed_major_upgrade_versions:
|
|
||||||
- "12"
|
|
||||||
- "13"
|
|
||||||
major_version_upgrade_mode: "off"
|
major_version_upgrade_mode: "off"
|
||||||
minimal_major_version: "9.5"
|
minimal_major_version: "9.5"
|
||||||
target_major_version: "13"
|
target_major_version: "13"
|
||||||
|
|
|
||||||
|
|
@ -968,14 +968,6 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
"major_version_upgrade": {
|
"major_version_upgrade": {
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Properties: map[string]apiextv1.JSONSchemaProps{
|
Properties: map[string]apiextv1.JSONSchemaProps{
|
||||||
"allowed_major_upgrade_versions": {
|
|
||||||
Type: "array",
|
|
||||||
Items: &apiextv1.JSONSchemaPropsOrArray{
|
|
||||||
Schema: &apiextv1.JSONSchemaProps{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"major_version_upgrade_mode": {
|
"major_version_upgrade_mode": {
|
||||||
Type: "string",
|
Type: "string",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ type MajorVersionUpgradeConfiguration struct {
|
||||||
MajorVersionUpgradeMode string `json:"major_version_upgrade_mode" default:"off"` // off - no actions, manual - manifest triggers action, full - manifest and minimal version violation trigger upgrade
|
MajorVersionUpgradeMode string `json:"major_version_upgrade_mode" default:"off"` // off - no actions, manual - manifest triggers action, full - manifest and minimal version violation trigger upgrade
|
||||||
MinimalMajorVersion string `json:"minimal_major_version" default:"9.5"`
|
MinimalMajorVersion string `json:"minimal_major_version" default:"9.5"`
|
||||||
TargetMajorVersion string `json:"target_major_version" default:"13"`
|
TargetMajorVersion string `json:"target_major_version" default:"13"`
|
||||||
AllowedMajorUpgradeVersions []string `json:"allowed_major_upgrade_versions" default:"12,13"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// KubernetesMetaConfiguration defines k8s conf required for all Postgres clusters and the operator itself
|
// KubernetesMetaConfiguration defines k8s conf required for all Postgres clusters and the operator itself
|
||||||
|
|
|
||||||
|
|
@ -312,11 +312,6 @@ func (in *MaintenanceWindow) DeepCopy() *MaintenanceWindow {
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *MajorVersionUpgradeConfiguration) DeepCopyInto(out *MajorVersionUpgradeConfiguration) {
|
func (in *MajorVersionUpgradeConfiguration) DeepCopyInto(out *MajorVersionUpgradeConfiguration) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.AllowedMajorUpgradeVersions != nil {
|
|
||||||
in, out := &in.AllowedMajorUpgradeVersions, &out.AllowedMajorUpgradeVersions
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -385,7 +380,7 @@ func (in *OperatorConfigurationData) DeepCopyInto(out *OperatorConfigurationData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out.PostgresUsersConfiguration = in.PostgresUsersConfiguration
|
out.PostgresUsersConfiguration = in.PostgresUsersConfiguration
|
||||||
in.MajorVersionUpgrade.DeepCopyInto(&out.MajorVersionUpgrade)
|
out.MajorVersionUpgrade = in.MajorVersionUpgrade
|
||||||
in.Kubernetes.DeepCopyInto(&out.Kubernetes)
|
in.Kubernetes.DeepCopyInto(&out.Kubernetes)
|
||||||
out.PostgresPodResources = in.PostgresPodResources
|
out.PostgresPodResources = in.PostgresPodResources
|
||||||
out.Timeouts = in.Timeouts
|
out.Timeouts = in.Timeouts
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
|
||||||
result.MajorVersionUpgradeMode = util.Coalesce(fromCRD.MajorVersionUpgrade.MajorVersionUpgradeMode, "off")
|
result.MajorVersionUpgradeMode = util.Coalesce(fromCRD.MajorVersionUpgrade.MajorVersionUpgradeMode, "off")
|
||||||
result.MinimalMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.MinimalMajorVersion, "9.5")
|
result.MinimalMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.MinimalMajorVersion, "9.5")
|
||||||
result.TargetMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.TargetMajorVersion, "13")
|
result.TargetMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.TargetMajorVersion, "13")
|
||||||
result.AllowedMajorUpgradeVersions = util.CoalesceStrArr(fromCRD.MajorVersionUpgrade.AllowedMajorUpgradeVersions, []string{"12", "13"})
|
|
||||||
|
|
||||||
// kubernetes config
|
// kubernetes config
|
||||||
result.CustomPodAnnotations = fromCRD.Kubernetes.CustomPodAnnotations
|
result.CustomPodAnnotations = fromCRD.Kubernetes.CustomPodAnnotations
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,6 @@ type Config struct {
|
||||||
MajorVersionUpgradeMode string `name:"major_version_upgrade_mode" default:"off"`
|
MajorVersionUpgradeMode string `name:"major_version_upgrade_mode" default:"off"`
|
||||||
MinimalMajorVersion string `name:"minimal_major_version" default:"9.5"`
|
MinimalMajorVersion string `name:"minimal_major_version" default:"9.5"`
|
||||||
TargetMajorVersion string `name:"target_major_version" default:"13"`
|
TargetMajorVersion string `name:"target_major_version" default:"13"`
|
||||||
AllowedMajorUpgradeVersions []string `name:"allowed_major_upgrade_versions" default:"12,13"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MustMarshal marshals the config or panics
|
// MustMarshal marshals the config or panics
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue