Skip to content

Commit

Permalink
fix svc endpints
Browse files Browse the repository at this point in the history
add unkonw label if pg is not running.
  • Loading branch information
zlianzhuang committed Dec 16, 2024
1 parent 3f36269 commit ef9a0ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion operatorversions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"clusterrolebinding": "radondb-postgres-operator-rolebinding-cluster",
"rolebinding": "radondb-postgres-operator-rolebinding-role",
"name": "radondb-postgres-operator",
"image": "radondb/radondb-postgres-operator:v1.4.1",
"image": "radondb/radondb-postgres-operator:v1.4.2",
"datapath": "/data",
"imageRegistry": "",
"namespaceOverride": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ spec:
priorityClassName: system-cluster-critical
containers:
- name: radondb-postgres-operator
image: radondb/radondb-postgres-operator:v1.4.1
image: radondb/radondb-postgres-operator:v1.4.2
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ def correct_postgresql_role(
if output == "on" and role != LABEL_ROLE_STANDBY:
logger.info("set pod " + pod.metadata.name + " to standby")
patch_body = patch_role_body(LABEL_ROLE_STANDBY)
if output != "on" and output != "off" and role != LABEL_ROLE_UNKNOWN:
logger.info("set pod " + pod.metadata.name + " to unknown")
patch_body = patch_role_body(LABEL_ROLE_UNKNOWN)

if patch_body != None:
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
LABEL_ROLE = "role"
LABEL_ROLE_PRIMARY = "primary"
LABEL_ROLE_STANDBY = "standby"
LABEL_ROLE_UNKNOWN = "unknown"

# other label
LABEL_STATEFULSET_NAME = "statefulset"
Expand Down

0 comments on commit ef9a0ea

Please sign in to comment.