Skip to content

Commit becf8a4

Browse files
yoshihikouenoFxKu
andauthored
Bump spilo and target version for PostgreSQL 15 (zalando#2139)
* Bumped Spilo image tag to the one that supports PostgreSQL 15. Using CDP version temporarily until non-CDP one is released. * Added support for PostgreSQL 15 and made it default. 9.5 and 9.6 are now no longer supported * Bumped spilo image tag to 2.1-p9 * Bumped spilo image in test launcher Co-authored-by: yoshihiko <[email protected]> Co-authored-by: Felix Kunde <[email protected]>
1 parent 9c88fb9 commit becf8a4

19 files changed

+31
-29
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
2929

3030
### PostgreSQL features
3131

32-
* Supports PostgreSQL 14, starting from 10+
32+
* Supports PostgreSQL 15, starting from 10+
3333
* Streaming replication cluster via Patroni
3434
* Point-In-Time-Recovery with
3535
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
@@ -61,7 +61,7 @@ We introduce the major version into the backup path to smoothen the [major versi
6161
The new operator configuration can set a compatibility flag *enable_spilo_wal_path_compat* to make Spilo look for wal segments in the current path but also old format paths.
6262
This comes at potential performance costs and should be disabled after a few days.
6363

64-
The newest Spilo image is: `registry.opensource.zalan.do/acid/spilo-14:2.1-p7`
64+
The newest Spilo image is: `ghcr.io/zalando/spilo-15:2.1-p9`
6565

6666
The last Spilo 12 image is: `registry.opensource.zalan.do/acid/spilo-12:1.6-p5`
6767

charts/postgres-operator-ui/templates/deployment.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ spec:
7676
"cost_core": 0.0575,
7777
"cost_memory": 0.014375,
7878
"postgresql_versions": [
79+
"15",
7980
"14",
8081
"13",
8182
"12",

charts/postgres-operator/crds/operatorconfigurations.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
type: string
6969
docker_image:
7070
type: string
71-
default: "registry.opensource.zalan.do/acid/spilo-14:2.1-p7"
71+
default: "ghcr.io/zalando/spilo-15:2.1-p9"
7272
enable_crd_registration:
7373
type: boolean
7474
default: true
@@ -170,7 +170,7 @@ spec:
170170
default: "11"
171171
target_major_version:
172172
type: string
173-
default: "14"
173+
default: "15"
174174
kubernetes:
175175
type: object
176176
properties:

charts/postgres-operator/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ configGeneral:
3838
# etcd connection string for Patroni. Empty uses K8s-native DCS.
3939
etcd_host: ""
4040
# Spilo docker image
41-
docker_image: registry.opensource.zalan.do/acid/spilo-14:2.1-p7
41+
docker_image: ghcr.io/zalando/spilo-15:2.1-p9
4242

4343
# key name for annotation to ignore globally configured instance limits
4444
# ignore_instance_limits_annotation_key: ""
@@ -91,7 +91,7 @@ configMajorVersionUpgrade:
9191
# minimal Postgres major version that will not automatically be upgraded
9292
minimal_major_version: "11"
9393
# target Postgres major version when upgrading clusters automatically
94-
target_major_version: "14"
94+
target_major_version: "15"
9595

9696
configKubernetes:
9797
# list of additional capabilities for postgres container

docs/reference/operator_parameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ CRD-configuration, they are grouped under the `major_version_upgrade` key.
251251
* **target_major_version**
252252
The target Postgres major version when upgrading clusters automatically
253253
which violate the configured allowed `minimal_major_version` when
254-
`major_version_upgrade_mode` is set to `"full"`. The default is `"14"`.
254+
`major_version_upgrade_mode` is set to `"full"`. The default is `"15"`.
255255

256256
## Kubernetes resources
257257

docs/user.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
databases:
3131
foo: zalando
3232
postgresql:
33-
version: "14"
33+
version: "15"
3434
```
3535
3636
Once you cloned the Postgres Operator [repository](https://github.com/zalando/postgres-operator)
@@ -109,7 +109,7 @@ metadata:
109109
spec:
110110
[...]
111111
postgresql:
112-
version: "14"
112+
version: "15"
113113
parameters:
114114
password_encryption: scram-sha-256
115115
```

e2e/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IFS=$'\n\t'
88

99
readonly cluster_name="postgres-operator-e2e-tests"
1010
readonly kubeconfig_path="/tmp/kind-config-${cluster_name}"
11-
readonly spilo_image="registry.opensource.zalan.do/acid/spilo-14-e2e:0.1"
11+
readonly spilo_image="registry.opensource.zalan.do/acid/spilo-15-e2e:0.1"
1212
readonly e2e_test_runner_image="registry.opensource.zalan.do/acid/postgres-operator-e2e-tests-runner:0.4"
1313

1414
export GOPATH=${GOPATH-~/go}

e2e/tests/test_e2e.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from tests.k8s_api import K8s
1313
from kubernetes.client.rest import ApiException
1414

15-
SPILO_CURRENT = "registry.opensource.zalan.do/acid/spilo-14-e2e:0.3"
16-
SPILO_LAZY = "registry.opensource.zalan.do/acid/spilo-14-e2e:0.4"
15+
SPILO_CURRENT = "registry.opensource.zalan.do/acid/spilo-15-e2e:0.1"
16+
SPILO_LAZY = "registry.opensource.zalan.do/acid/spilo-15-e2e:0.2"
1717

1818

1919
def to_selector(labels):

manifests/complete-postgres-manifest.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
# "delete-date": "2020-08-31" # can only be deleted on that day if "delete-date "key is configured
1111
# "delete-clustername": "acid-test-cluster" # can only be deleted when name matches if "delete-clustername" key is configured
1212
spec:
13-
dockerImage: registry.opensource.zalan.do/acid/spilo-14:2.1-p7
13+
dockerImage: ghcr.io/zalando/spilo-15:2.1-p9
1414
teamId: "acid"
1515
numberOfInstances: 2
1616
users: # Application/Robot users
@@ -44,7 +44,7 @@ spec:
4444
defaultRoles: true
4545
defaultUsers: false
4646
postgresql:
47-
version: "14"
47+
version: "15"
4848
parameters: # Expert section
4949
shared_buffers: "32MB"
5050
max_connections: "10"

manifests/configmap.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ data:
3434
# default_memory_request: 100Mi
3535
# delete_annotation_date_key: delete-date
3636
# delete_annotation_name_key: delete-clustername
37-
docker_image: registry.opensource.zalan.do/acid/spilo-14:2.1-p7
37+
docker_image: ghcr.io/zalando/spilo-15:2.1-p9
3838
# downscaler_annotations: "deployment-time,downscaler/*"
3939
# enable_admin_role_for_users: "true"
4040
# enable_crd_registration: "true"
@@ -145,7 +145,7 @@ data:
145145
spilo_privileged: "false"
146146
storage_resize_mode: "pvc"
147147
super_username: postgres
148-
# target_major_version: "14"
148+
# target_major_version: "15"
149149
# team_admin_role: "admin"
150150
# team_api_role_configuration: "log_statement:all"
151151
# teams_api_url: http://fake-teams-api.default.svc.cluster.local

manifests/minimal-postgres-manifest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ spec:
1717
preparedDatabases:
1818
bar: {}
1919
postgresql:
20-
version: "14"
20+
version: "15"

manifests/operatorconfiguration.crd.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
type: string
6767
docker_image:
6868
type: string
69-
default: "registry.opensource.zalan.do/acid/spilo-14:2.1-p7"
69+
default: "ghcr.io/zalando/spilo-15:2.1-p9"
7070
enable_crd_registration:
7171
type: boolean
7272
default: true
@@ -168,7 +168,7 @@ spec:
168168
default: "11"
169169
target_major_version:
170170
type: string
171-
default: "14"
171+
default: "15"
172172
kubernetes:
173173
type: object
174174
properties:

manifests/postgresql-operator-default-configuration.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: OperatorConfiguration
33
metadata:
44
name: postgresql-operator-default-configuration
55
configuration:
6-
docker_image: registry.opensource.zalan.do/acid/spilo-14:2.1-p7
6+
docker_image: ghcr.io/zalando/spilo-15:2.1-p9
77
# enable_crd_registration: true
88
# crd_categories:
99
# - all
@@ -40,7 +40,7 @@ configuration:
4040
# major_version_upgrade_team_allow_list:
4141
# - acid
4242
minimal_major_version: "11"
43-
target_major_version: "14"
43+
target_major_version: "15"
4444
kubernetes:
4545
# additional_pod_capabilities:
4646
# - "SYS_NICE"

manifests/standby-manifest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
size: 1Gi
99
numberOfInstances: 1
1010
postgresql:
11-
version: "14"
11+
version: "15"
1212
# Make this a standby cluster and provide either the s3 bucket path of source cluster or the remote primary host for continuous streaming.
1313
standby:
1414
# s3_wal_path: "s3://mybucket/spilo/acid-minimal-cluster/abcd1234-2a4b-4b2a-8c9c-c1234defg567/wal/14/"

pkg/apis/acid.zalan.do/v1/operator_configuration_type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type MajorVersionUpgradeConfiguration struct {
5050
MajorVersionUpgradeMode string `json:"major_version_upgrade_mode" default:"off"` // off - no actions, manual - manifest triggers action, full - manifest and minimal version violation trigger upgrade
5151
MajorVersionUpgradeTeamAllowList []string `json:"major_version_upgrade_team_allow_list,omitempty"`
5252
MinimalMajorVersion string `json:"minimal_major_version" default:"11"`
53-
TargetMajorVersion string `json:"target_major_version" default:"14"`
53+
TargetMajorVersion string `json:"target_major_version" default:"15"`
5454
}
5555

5656
// KubernetesMetaConfiguration defines k8s conf required for all Postgres clusters and the operator itself

pkg/cluster/majorversionupgrade.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var VersionMap = map[string]int{
1717
"13": 130000,
1818
"14": 140000,
1919
"15": 150000,
20+
2021
}
2122

2223
// IsBiggerPostgresVersion Compare two Postgres version numbers
@@ -35,7 +36,7 @@ func (c *Cluster) GetDesiredMajorVersionAsInt() int {
3536
func (c *Cluster) GetDesiredMajorVersion() string {
3637

3738
if c.Config.OpConfig.MajorVersionUpgradeMode == "full" {
38-
// e.g. current is 10, minimal is 11 allowing 11 to 14 clusters, everything below is upgraded
39+
// e.g. current is 10, minimal is 11 allowing 11 to 15 clusters, everything below is upgraded
3940
if IsBiggerPostgresVersion(c.Spec.PgVersion, c.Config.OpConfig.MinimalMajorVersion) {
4041
c.logger.Infof("overwriting configured major version %s to %s", c.Spec.PgVersion, c.Config.OpConfig.TargetMajorVersion)
4142
return c.Config.OpConfig.TargetMajorVersion

pkg/controller/operator_config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
3939
result.EnableTeamIdClusternamePrefix = fromCRD.EnableTeamIdClusternamePrefix
4040
result.EtcdHost = fromCRD.EtcdHost
4141
result.KubernetesUseConfigMaps = fromCRD.KubernetesUseConfigMaps
42-
result.DockerImage = util.Coalesce(fromCRD.DockerImage, "registry.opensource.zalan.do/acid/spilo-14:2.1-p7")
42+
result.DockerImage = util.Coalesce(fromCRD.DockerImage, "ghcr.io/zalando/spilo-15:2.1-p9")
4343
result.Workers = util.CoalesceUInt32(fromCRD.Workers, 8)
4444
result.MinInstances = fromCRD.MinInstances
4545
result.MaxInstances = fromCRD.MaxInstances
@@ -63,7 +63,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
6363
result.MajorVersionUpgradeMode = util.Coalesce(fromCRD.MajorVersionUpgrade.MajorVersionUpgradeMode, "off")
6464
result.MajorVersionUpgradeTeamAllowList = fromCRD.MajorVersionUpgrade.MajorVersionUpgradeTeamAllowList
6565
result.MinimalMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.MinimalMajorVersion, "11")
66-
result.TargetMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.TargetMajorVersion, "14")
66+
result.TargetMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.TargetMajorVersion, "15")
6767

6868
// kubernetes config
6969
result.CustomPodAnnotations = fromCRD.Kubernetes.CustomPodAnnotations

pkg/util/config/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ type Config struct {
165165
WatchedNamespace string `name:"watched_namespace"` // special values: "*" means 'watch all namespaces', the empty string "" means 'watch a namespace where operator is deployed to'
166166
KubernetesUseConfigMaps bool `name:"kubernetes_use_configmaps" default:"false"`
167167
EtcdHost string `name:"etcd_host" default:""` // special values: the empty string "" means Patroni will use K8s as a DCS
168-
DockerImage string `name:"docker_image" default:"registry.opensource.zalan.do/acid/spilo-14:2.1-p7"`
168+
DockerImage string `name:"docker_image" default:"ghcr.io/zalando/spilo-15:2.1-p9"`
169169
SidecarImages map[string]string `name:"sidecar_docker_images"` // deprecated in favour of SidecarContainers
170170
SidecarContainers []v1.Container `name:"sidecars"`
171171
PodServiceAccountName string `name:"pod_service_account_name" default:"postgres-pod"`
@@ -233,7 +233,7 @@ type Config struct {
233233
MajorVersionUpgradeMode string `name:"major_version_upgrade_mode" default:"off"`
234234
MajorVersionUpgradeTeamAllowList []string `name:"major_version_upgrade_team_allow_list" default:""`
235235
MinimalMajorVersion string `name:"minimal_major_version" default:"11"`
236-
TargetMajorVersion string `name:"target_major_version" default:"14"`
236+
TargetMajorVersion string `name:"target_major_version" default:"15"`
237237
PatroniAPICheckInterval time.Duration `name:"patroni_api_check_interval" default:"1s"`
238238
PatroniAPICheckTimeout time.Duration `name:"patroni_api_check_timeout" default:"5s"`
239239
EnablePatroniFailsafeMode *bool `name:"enable_patroni_failsafe_mode" default:"false"`

ui/operator_ui/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def index():
321321
'users_visible': True,
322322
'databases_visible': True,
323323
'resources_visible': RESOURCES_VISIBLE,
324-
'postgresql_versions': ['11', '12', '13', '14'],
324+
'postgresql_versions': ['11', '12', '13', '14', '15'],
325325
'dns_format_string': '{0}.{1}',
326326
'pgui_link': '',
327327
'static_network_whitelist': {},

0 commit comments

Comments
 (0)