remove AllowedMajorUpgradeVersions option
This commit is contained in:
		
							parent
							
								
									3d847b7b2b
								
							
						
					
					
						commit
						5a44ba1f45
					
				| 
						 | 
				
			
			@ -130,13 +130,6 @@ spec:
 | 
			
		|||
              major_version_upgrade:
 | 
			
		||||
                type: object
 | 
			
		||||
                properties:
 | 
			
		||||
                  allowed_major_upgrade_versions:
 | 
			
		||||
                    type: array
 | 
			
		||||
                    items:
 | 
			
		||||
                      type: string
 | 
			
		||||
                    default:
 | 
			
		||||
                    - "12"
 | 
			
		||||
                    - "13"
 | 
			
		||||
                  major_version_upgrade_mode:
 | 
			
		||||
                    type: string
 | 
			
		||||
                    default: "off"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,10 +59,6 @@ configUsers:
 | 
			
		|||
  super_username: postgres
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
  major_version_upgrade_mode: "off"
 | 
			
		||||
  # minimal Postgres major version that will not automatically be upgraded
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,8 +61,6 @@ configUsers:
 | 
			
		|||
  super_username: postgres
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
  major_version_upgrade_mode: "off"
 | 
			
		||||
  # 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
 | 
			
		||||
to `off` which means the cluster version will not change when increased in
 | 
			
		||||
the manifest. Still, a rolling update would be triggered updating the
 | 
			
		||||
`PGVERSION` variable. But `configure_spilo` will notice the version mismatch
 | 
			
		||||
and start the old version again.
 | 
			
		||||
`PGVERSION` variable. But Spilo's [`configure_spilo`](https://github.com/zalando/spilo/blob/master/postgres-appliance/scripts/configure_spilo.py)
 | 
			
		||||
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
 | 
			
		||||
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
 | 
			
		||||
  `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
 | 
			
		||||
 | 
			
		||||
Parameters to configure cluster-related Kubernetes objects created by the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,6 @@ data:
 | 
			
		|||
  # additional_pod_capabilities: "SYS_NICE"
 | 
			
		||||
  # additional_secret_mount: "some-secret-name"
 | 
			
		||||
  # additional_secret_mount_path: "/some/dir"
 | 
			
		||||
  # allowed_major_upgrade_versions: "12,13"
 | 
			
		||||
  api_port: "8080"
 | 
			
		||||
  aws_region: eu-central-1
 | 
			
		||||
  cluster_domain: cluster.local
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -126,13 +126,6 @@ spec:
 | 
			
		|||
              major_version_upgrade:
 | 
			
		||||
                type: object
 | 
			
		||||
                properties:
 | 
			
		||||
                  allowed_major_upgrade_versions:
 | 
			
		||||
                    type: array
 | 
			
		||||
                    items:
 | 
			
		||||
                      type: string
 | 
			
		||||
                    default:
 | 
			
		||||
                    - "12"
 | 
			
		||||
                    - "13"
 | 
			
		||||
                  major_version_upgrade_mode:
 | 
			
		||||
                    type: string
 | 
			
		||||
                    default: "off"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,9 +27,6 @@ configuration:
 | 
			
		|||
    replication_username: standby
 | 
			
		||||
    super_username: postgres
 | 
			
		||||
  major_version_upgrade:
 | 
			
		||||
    allowed_major_upgrade_versions:
 | 
			
		||||
      - "12"
 | 
			
		||||
      - "13"
 | 
			
		||||
    major_version_upgrade_mode: "off"
 | 
			
		||||
    minimal_major_version: "9.5"
 | 
			
		||||
    target_major_version: "13"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -968,14 +968,6 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
 | 
			
		|||
					"major_version_upgrade": {
 | 
			
		||||
						Type: "object",
 | 
			
		||||
						Properties: map[string]apiextv1.JSONSchemaProps{
 | 
			
		||||
							"allowed_major_upgrade_versions": {
 | 
			
		||||
								Type: "array",
 | 
			
		||||
								Items: &apiextv1.JSONSchemaPropsOrArray{
 | 
			
		||||
									Schema: &apiextv1.JSONSchemaProps{
 | 
			
		||||
										Type: "string",
 | 
			
		||||
									},
 | 
			
		||||
								},
 | 
			
		||||
							},
 | 
			
		||||
							"major_version_upgrade_mode": {
 | 
			
		||||
								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
 | 
			
		||||
	MinimalMajorVersion         string   `json:"minimal_major_version" default:"9.5"`
 | 
			
		||||
	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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
func (in *MajorVersionUpgradeConfiguration) DeepCopyInto(out *MajorVersionUpgradeConfiguration) {
 | 
			
		||||
	*out = *in
 | 
			
		||||
	if in.AllowedMajorUpgradeVersions != nil {
 | 
			
		||||
		in, out := &in.AllowedMajorUpgradeVersions, &out.AllowedMajorUpgradeVersions
 | 
			
		||||
		*out = make([]string, len(*in))
 | 
			
		||||
		copy(*out, *in)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -385,7 +380,7 @@ func (in *OperatorConfigurationData) DeepCopyInto(out *OperatorConfigurationData
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	out.PostgresUsersConfiguration = in.PostgresUsersConfiguration
 | 
			
		||||
	in.MajorVersionUpgrade.DeepCopyInto(&out.MajorVersionUpgrade)
 | 
			
		||||
	out.MajorVersionUpgrade = in.MajorVersionUpgrade
 | 
			
		||||
	in.Kubernetes.DeepCopyInto(&out.Kubernetes)
 | 
			
		||||
	out.PostgresPodResources = in.PostgresPodResources
 | 
			
		||||
	out.Timeouts = in.Timeouts
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,7 +58,6 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
 | 
			
		|||
	result.MajorVersionUpgradeMode = util.Coalesce(fromCRD.MajorVersionUpgrade.MajorVersionUpgradeMode, "off")
 | 
			
		||||
	result.MinimalMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.MinimalMajorVersion, "9.5")
 | 
			
		||||
	result.TargetMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.TargetMajorVersion, "13")
 | 
			
		||||
	result.AllowedMajorUpgradeVersions = util.CoalesceStrArr(fromCRD.MajorVersionUpgrade.AllowedMajorUpgradeVersions, []string{"12", "13"})
 | 
			
		||||
 | 
			
		||||
	// kubernetes config
 | 
			
		||||
	result.CustomPodAnnotations = fromCRD.Kubernetes.CustomPodAnnotations
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -209,7 +209,6 @@ type Config struct {
 | 
			
		|||
	MajorVersionUpgradeMode                string            `name:"major_version_upgrade_mode" default:"off"`
 | 
			
		||||
	MinimalMajorVersion                    string            `name:"minimal_major_version" default:"9.5"`
 | 
			
		||||
	TargetMajorVersion                     string            `name:"target_major_version" default:"13"`
 | 
			
		||||
	AllowedMajorUpgradeVersions            []string          `name:"allowed_major_upgrade_versions" default:"12,13"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MustMarshal marshals the config or panics
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue