Skip to content

Commit 109c3f2

Browse files
committed
Merge pull request kubernetes#12834 from eldarion-gondor/fix-validate-cluster-on-error
When calling kubectl.sh, allow error due to API server bouncing
2 parents 71042e1 + b1c418e commit 109c3f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster/validate-cluster.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ while true; do
4040
# Suppress errors from kubectl output because during cluster bootstrapping
4141
# for clusters where the master node is registered, the apiserver will become
4242
# available and then get restarted as the kubelet configures the docker bridge.
43-
nodes_status=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o template --template='{{range .items}}{{with index .status.conditions 0}}{{.type}}:{{.status}},{{end}}{{end}}' --api-version=v1)
43+
nodes_status=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o template --template='{{range .items}}{{with index .status.conditions 0}}{{.type}}:{{.status}},{{end}}{{end}}' --api-version=v1) || true
4444
found=$(echo "${nodes_status}" | tr "," "\n" | grep -c 'Ready:') || true
4545
ready=$(echo "${nodes_status}" | tr "," "\n" | grep -c 'Ready:True') || true
4646

0 commit comments

Comments
 (0)