Skip to content

Commit ef9a0ea

Browse files
committed
fix svc endpints
add unkonw label if pg is not running.
1 parent 3f36269 commit ef9a0ea

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

operatorversions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"clusterrolebinding": "radondb-postgres-operator-rolebinding-cluster",
77
"rolebinding": "radondb-postgres-operator-rolebinding-role",
88
"name": "radondb-postgres-operator",
9-
"image": "radondb/radondb-postgres-operator:v1.4.1",
9+
"image": "radondb/radondb-postgres-operator:v1.4.2",
1010
"datapath": "/data",
1111
"imageRegistry": "",
1212
"namespaceOverride": ""

platforms/kubernetes/postgres-operator/deploy/postgres-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ spec:
723723
priorityClassName: system-cluster-critical
724724
containers:
725725
- name: radondb-postgres-operator
726-
image: radondb/radondb-postgres-operator:v1.4.1
726+
image: radondb/radondb-postgres-operator:v1.4.2
727727
imagePullPolicy: IfNotPresent
728728
resources:
729729
requests:

platforms/kubernetes/postgres-operator/postgres/pgsqlclusters/timer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ def correct_postgresql_role(
302302
if output == "on" and role != LABEL_ROLE_STANDBY:
303303
logger.info("set pod " + pod.metadata.name + " to standby")
304304
patch_body = patch_role_body(LABEL_ROLE_STANDBY)
305+
if output != "on" and output != "off" and role != LABEL_ROLE_UNKNOWN:
306+
logger.info("set pod " + pod.metadata.name + " to unknown")
307+
patch_body = patch_role_body(LABEL_ROLE_UNKNOWN)
305308

306309
if patch_body != None:
307310
try:

platforms/kubernetes/postgres-operator/postgres/pgsqlcommons/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
LABEL_ROLE = "role"
152152
LABEL_ROLE_PRIMARY = "primary"
153153
LABEL_ROLE_STANDBY = "standby"
154+
LABEL_ROLE_UNKNOWN = "unknown"
154155

155156
# other label
156157
LABEL_STATEFULSET_NAME = "statefulset"

0 commit comments

Comments
 (0)