Skip to content

Commit 28aaee8

Browse files
committed
e2e: fix dbops-restart-with-failed-pod
1 parent 2cc60ec commit 28aaee8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stackgres-k8s/e2e/spec/dbops-restart-with-failed-pod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ check_cluster_start_not_fail_if_cluster_failed() {
3131
kubectl patch sgcluster -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" --type json \
3232
-p '[{"op":"add","path":"/spec/pods/scheduling","value":{"nodeSelector":{"test":"test"}}}]'
3333
wait_until eval 'kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
34-
| jq .spec.nodeSelector.test | grep -q test'
34+
| jq .spec.template.spec.nodeSelector.test | grep -q test'
3535

3636
cat << EOF | kubectl create -f -
3737
apiVersion: stackgres.io/v1
@@ -52,7 +52,7 @@ EOF
5252
wait_until kubectl patch sgcluster -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" --type json \
5353
-p '[{"op":"remove","path":"/spec/pods/scheduling"}]'
5454
wait_until eval 'kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
55-
| jq .spec.nodeSelector | grep -q null'
55+
| jq .spec.template.spec.nodeSelector | grep -q null'
5656

5757
cat << EOF | kubectl create -f -
5858
apiVersion: stackgres.io/v1
@@ -82,7 +82,7 @@ check_cluster_start_not_fail_if_pod_failed() {
8282
kubectl patch sgcluster -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" --type json \
8383
-p '[{"op":"add","path":"/spec/pods/scheduling","value":{"nodeSelector":{"test":"test"}}}]'
8484
wait_until eval 'kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
85-
| jq .spec.nodeSelector.test | grep -q test'
85+
| jq .spec.template.spec.nodeSelector.test | grep -q test'
8686

8787
cat << EOF | kubectl create -f -
8888
apiVersion: stackgres.io/v1
@@ -103,7 +103,7 @@ EOF
103103
wait_until kubectl patch sgcluster -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" --type json \
104104
-p '[{"op":"remove","path":"/spec/pods/scheduling"}]'
105105
wait_until eval 'kubectl get sts -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json \
106-
| jq .spec.nodeSelector | grep -q null'
106+
| jq .spec.template.spec.nodeSelector | grep -q null'
107107

108108
cat << EOF | kubectl create -f -
109109
apiVersion: stackgres.io/v1

0 commit comments

Comments
 (0)