@@ -66,9 +66,9 @@ ssl_check() {
6666 local EXIT_CODE RESULT
6767 while [ " $RETRY " -gt 0 ]
6868 do
69- if ! wait_until -t " $(( E 2 E_TIMEOUT / 4 )) " run_query -m require -h " $CLUSTER_NAME " -i 1 -p 5432
69+ if ! kubectl get sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " -o json | jq .spec.pods.disableEnvoy | grep -qxF true
7070 then
71- if ! kubectl get sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " -o json | jq .spec.pods.disableEnvoy | grep -qxF true
71+ if ! wait_until -t " $(( E 2 E_TIMEOUT / 4 )) " run_query -m require -h " $CLUSTER_NAME " -i 1 -p 5432
7272 then
7373 echo " WARNING: SSL was not updated automatically... seems an envoy bug, will restart it"
7474 kubectl delete pod -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME -0"
@@ -93,16 +93,16 @@ ssl_check() {
9393 local EXIT_CODE RESULT
9494 while [ " $RETRY " -gt 0 ]
9595 do
96- if ! wait_until -t " $(( E 2 E_TIMEOUT / 4 )) " run_query -m require -h " $CLUSTER_NAME " -replicas -i 0 -p 5432
96+ if ! kubectl get sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " -o json | jq .spec.pods.disableEnvoy | grep -qxF true
9797 then
98- if ! kubectl get sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " -o json | jq .spec.pods.disableEnvoy | grep -qxF true
98+ if ! wait_until -t " $(( E 2 E_TIMEOUT / 4 )) " run_query -m require -h " $CLUSTER_NAME " -replicas -i 0 -p 5432
9999 then
100100 echo " WARNING: SSL was not updated automatically... seems an envoy bug, will restart it"
101+ kubectl delete pod -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME -1"
102+ wait_pods_running " $CLUSTER_NAMESPACE " 2
103+ wait_cluster " $CLUSTER_NAME " " $CLUSTER_NAMESPACE "
104+ switch_cluster_to_first " $CLUSTER_NAME " " $CLUSTER_NAMESPACE "
101105 fi
102- kubectl delete pod -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME -1"
103- wait_pods_running " $CLUSTER_NAMESPACE " 2
104- wait_cluster " $CLUSTER_NAME " " $CLUSTER_NAMESPACE "
105- switch_cluster_to_first " $CLUSTER_NAME " " $CLUSTER_NAMESPACE "
106106 fi
107107 try_function wait_until -t " $(( E2 E_TIMEOUT / 4 )) " run_query -m require -h " $CLUSTER_NAME " -replicas -i 0 -p 5432
108108 if " $RESULT "
0 commit comments