@@ -30,6 +30,8 @@ check_cluster_start_not_fail_if_cluster_failed() {
3030 set_restarted_pods
3131 kubectl patch sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " --type json \
3232 -p ' [{"op":"add","path":"/spec/pods/scheduling","value":{"nodeSelector":{"test":"test"}}}]'
33+ wait_until eval ' kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
34+ | jq .spec.nodeSelector.test | grep -q test'
3335
3436 cat << EOF | kubectl create -f -
3537apiVersion: stackgres.io/v1
4951
5052 wait_until kubectl patch sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " --type json \
5153 -p ' [{"op":"remove","path":"/spec/pods/scheduling"}]'
54+ wait_until eval ' kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
55+ | jq .spec.nodeSelector | grep -q null'
5256
5357 cat << EOF | kubectl create -f -
5458apiVersion: stackgres.io/v1
@@ -77,6 +81,8 @@ check_cluster_start_not_fail_if_pod_failed() {
7781 set_restarted_pods dbops-restart-with-failed-pod-1 dbops-restart-with-failed-pod-0
7882 kubectl patch sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " --type json \
7983 -p ' [{"op":"add","path":"/spec/pods/scheduling","value":{"nodeSelector":{"test":"test"}}}]'
84+ wait_until eval ' kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
85+ | jq .spec.nodeSelector.test | grep -q test'
8086
8187 cat << EOF | kubectl create -f -
8288apiVersion: stackgres.io/v1
96102
97103 wait_until kubectl patch sgcluster -n " $CLUSTER_NAMESPACE " " $CLUSTER_NAME " --type json \
98104 -p ' [{"op":"remove","path":"/spec/pods/scheduling"}]'
105+ wait_until eval ' kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
106+ | jq .spec.nodeSelector | grep -q null'
99107
100108 cat << EOF | kubectl create -f -
101109apiVersion: stackgres.io/v1
0 commit comments