Skip to content

Commit 4611362

Browse files
committed
use spilo prod image and fix unit test
1 parent d3216a9 commit 4611362

File tree

11 files changed

+19
-19
lines changed

11 files changed

+19
-19
lines changed

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
type: string
6969
docker_image:
7070
type: string
71-
default: "container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2"
71+
default: "container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5"
7272
enable_crd_registration:
7373
type: boolean
7474
default: true

charts/postgres-operator/values.yaml

Lines changed: 1 addition & 1 deletion
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: container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2
41+
docker_image: container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5
4242

4343
# key name for annotation to ignore globally configured instance limits
4444
# ignore_instance_limits_annotation_key: ""

e2e/run.sh

Lines changed: 1 addition & 1 deletion
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="container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2"
11+
readonly spilo_image="container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5"
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from tests.k8s_api import K8s
1313
from kubernetes.client.rest import ApiException
1414

15-
SPILO_CURRENT = "container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2"
16-
SPILO_LAZY = "container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2"
17-
SPILO_FULL_IMAGE = "container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2"
15+
SPILO_CURRENT = "container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5"
16+
SPILO_LAZY = "container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5"
17+
SPILO_FULL_IMAGE = "container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5"
1818

1919
def to_selector(labels):
2020
return ",".join(["=".join(lbl) for lbl in labels.items()])

manifests/complete-postgres-manifest.yaml

Lines changed: 1 addition & 1 deletion
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: container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2
13+
dockerImage: container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5
1414
numberOfInstances: 2
1515
users: # Application/Robot users
1616
zalando:

manifests/configmap.yaml

Lines changed: 1 addition & 1 deletion
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: container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2
37+
docker_image: container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5
3838
# downscaler_annotations: "deployment-time,downscaler/*"
3939
enable_admin_role_for_users: "true"
4040
enable_crd_registration: "true"

manifests/operatorconfiguration.crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
type: string
6767
docker_image:
6868
type: string
69-
default: "container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2"
69+
default: "container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5"
7070
enable_crd_registration:
7171
type: boolean
7272
default: true

manifests/postgresql-operator-default-configuration.yaml

Lines changed: 1 addition & 1 deletion
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: container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2
6+
docker_image: container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5
77
# enable_crd_registration: true
88
# crd_categories:
99
# - all

pkg/cluster/k8sres_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
7979
PamRoleName: "zalandos",
8080
},
8181
},
82-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/16/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{}}}`,
82+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/17/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{}}}`,
8383
},
8484
{
8585
subtest: "Patroni configured",
@@ -102,7 +102,7 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
102102
FailsafeMode: util.True(),
103103
},
104104
opConfig: &config.Config{},
105-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/16/bin","pg_hba":["hostssl all all 0.0.0.0/0 md5","host all all 0.0.0.0/0 md5"]},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"},"data-checksums",{"encoding":"UTF8"},{"locale":"en_US.UTF-8"}],"dcs":{"ttl":30,"loop_wait":10,"retry_timeout":10,"maximum_lag_on_failover":33554432,"synchronous_mode":true,"synchronous_mode_strict":true,"synchronous_node_count":1,"slots":{"permanent_logical_1":{"database":"foo","plugin":"pgoutput","type":"logical"}},"failsafe_mode":true}}}`,
105+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/17/bin","pg_hba":["hostssl all all 0.0.0.0/0 md5","host all all 0.0.0.0/0 md5"]},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"},"data-checksums",{"encoding":"UTF8"},{"locale":"en_US.UTF-8"}],"dcs":{"ttl":30,"loop_wait":10,"retry_timeout":10,"maximum_lag_on_failover":33554432,"synchronous_mode":true,"synchronous_mode_strict":true,"synchronous_node_count":1,"slots":{"permanent_logical_1":{"database":"foo","plugin":"pgoutput","type":"logical"}},"failsafe_mode":true}}}`,
106106
},
107107
{
108108
subtest: "Patroni failsafe_mode configured globally",
@@ -111,7 +111,7 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
111111
opConfig: &config.Config{
112112
EnablePatroniFailsafeMode: util.True(),
113113
},
114-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/16/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{"failsafe_mode":true}}}`,
114+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/17/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{"failsafe_mode":true}}}`,
115115
},
116116
{
117117
subtest: "Patroni failsafe_mode configured globally, disabled for cluster",
@@ -122,7 +122,7 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
122122
opConfig: &config.Config{
123123
EnablePatroniFailsafeMode: util.True(),
124124
},
125-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/16/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{"failsafe_mode":false}}}`,
125+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/17/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{"failsafe_mode":false}}}`,
126126
},
127127
{
128128
subtest: "Patroni failsafe_mode disabled globally, configured for cluster",
@@ -133,7 +133,7 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
133133
opConfig: &config.Config{
134134
EnablePatroniFailsafeMode: util.False(),
135135
},
136-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/16/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{"failsafe_mode":true}}}`,
136+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/17/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"dcs":{"failsafe_mode":true}}}`,
137137
},
138138
}
139139
for _, tt := range tests {
@@ -164,13 +164,13 @@ func TestExtractPgVersionFromBinPath(t *testing.T) {
164164
},
165165
{
166166
subTest: "test current bin path against hard coded template",
167-
binPath: "/usr/lib/postgresql/16/bin",
167+
binPath: "/usr/lib/postgresql/17/bin",
168168
template: pgBinariesLocationTemplate,
169169
expected: "17",
170170
},
171171
{
172172
subTest: "test alternative bin path against a matching template",
173-
binPath: "/usr/pgsql-16/bin",
173+
binPath: "/usr/pgsql-17/bin",
174174
template: "/usr/pgsql-%v/bin",
175175
expected: "17",
176176
},

pkg/controller/operator_config.go

Lines changed: 1 addition & 1 deletion
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, "container-registry-test.zalando.net/acid/spilo-cdp-17:3.3-p2")
42+
result.DockerImage = util.Coalesce(fromCRD.DockerImage, "container-registry.zalando.net/acid/spilo-cdp-17:3.3-p5")
4343
result.Workers = util.CoalesceUInt32(fromCRD.Workers, 8)
4444
result.MinInstances = fromCRD.MinInstances
4545
result.MaxInstances = fromCRD.MaxInstances

0 commit comments

Comments
 (0)