@@ -180,18 +180,18 @@ check_old_primary_in_ha_group_not_in_replicas_service_after_changing_role() {
180180 kubectl delete pod -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME -2"
181181 create_or_replace_cluster " $CLUSTER_NAME " " $CLUSTER_NAMESPACE " " 3" \
182182 --set cluster.replication.mode=sync \
183- --set cluster.replication.role=ha-read \
183+ --set cluster.replication.role=ha \
184184 --set cluster.replication.syncInstances=2 \
185185 --set cluster.replication.groups[0].instances=1 \
186- --set cluster.replication.groups[0].role=ha \
186+ --set cluster.replication.groups[0].role=ha-read \
187187 --set cluster.pods.scheduling.nodeSelector." $NODE_LABEL_KEY =null"
188188 # This is not a typo, helm does not support removing a property so we need to repeat the change in order to make it work :facepalm:
189189 create_or_replace_cluster " $CLUSTER_NAME " " $CLUSTER_NAMESPACE " " 3" \
190190 --set cluster.replication.mode=sync \
191- --set cluster.replication.role=ha-read \
191+ --set cluster.replication.role=ha \
192192 --set cluster.replication.syncInstances=2 \
193193 --set cluster.replication.groups[0].instances=1 \
194- --set cluster.replication.groups[0].role=ha \
194+ --set cluster.replication.groups[0].role=ha-read \
195195 --set cluster.pods.scheduling.nodeSelector." $NODE_LABEL_KEY =null"
196196 wait_until delete_pod_and_wait_scheduled " $CLUSTER_NAMESPACE " " $CLUSTER_NAME -0"
197197 wait_until delete_pod_and_wait_scheduled " $CLUSTER_NAMESPACE " " $CLUSTER_NAME -1"
@@ -395,11 +395,11 @@ check_pod_ip_exposed_by_service() {
395395 local CLUSTER_NAMESPACE=" $1 "
396396 local POD_NAME=" $2 "
397397 local SERVICE_NAME=" $3 "
398- local POD_2_IP SERVICE_IPS
399- POD_2_IP =" $( kubectl get pod -n " $CLUSTER_NAMESPACE " " $POD_NAME " --template ' {{ .status.podIP }}' ) "
398+ local POD_IP SERVICE_IPS
399+ POD_IP =" $( kubectl get pod -n " $CLUSTER_NAMESPACE " " $POD_NAME " --template ' {{ .status.podIP }}' ) "
400400 SERVICE_IPS=" $( kubectl get endpoints -n " $CLUSTER_NAMESPACE " " $SERVICE_NAME " \
401401 --template ' {{ range .subsets }}{{ range .addresses }}{{ printf "%s\n" .ip }}{{ end }}{{ end }}' ) "
402- if echo " $SERVICE_IPS " | grep -qxF " $POD_2_IP "
402+ if echo " $SERVICE_IPS " | grep -qxF " $POD_IP "
403403 then
404404 success " pod $POD_NAME IP was exposed by sevice $SERVICE_NAME "
405405 else
@@ -411,11 +411,11 @@ check_pod_ip_not_exposed_by_service() {
411411 local CLUSTER_NAMESPACE=" $1 "
412412 local POD_NAME=" $2 "
413413 local SERVICE_NAME=" $3 "
414- local POD_2_IP SERVICE_IPS
415- POD_2_IP =" $( kubectl get pod -n " $CLUSTER_NAMESPACE " " $POD_NAME " --template ' {{ .status.podIP }}' ) "
414+ local POD_IP SERVICE_IPS
415+ POD_IP =" $( kubectl get pod -n " $CLUSTER_NAMESPACE " " $POD_NAME " --template ' {{ .status.podIP }}' ) "
416416 SERVICE_IPS=" $( kubectl get endpoints -n " $CLUSTER_NAMESPACE " " $SERVICE_NAME " \
417417 --template ' {{ range .subsets }}{{ range .addresses }}{{ printf "%s\n" .ip }}{{ end }}{{ end }}' ) "
418- if echo " $SERVICE_IPS " | grep -qxF " $POD_2_IP "
418+ if echo " $SERVICE_IPS " | grep -qxF " $POD_IP "
419419 then
420420 fail " pod $POD_NAME IP was exposed by sevice $SERVICE_NAME "
421421 else
0 commit comments