validate-cluster.sh: Don't use ignored and deprecated option '--api-version'

When using this flag, this error is shown:

    Flag --api-version has been deprecated, flag is no longer respected and will be deleted in the next release

Stop using the flag in the validate-cluster.sh script and avoid the warning.
This commit is contained in:
Rodrigo Campos 2016-03-17 12:47:19 -03:00
parent 435bc35812
commit 902a04d637

View File

@ -89,7 +89,7 @@ while true; do
# Echo the output and gather 2 counts: # Echo the output and gather 2 counts:
# - Total number of componentstatuses. # - Total number of componentstatuses.
# - Number of "healthy" components. # - Number of "healthy" components.
cs_status=$("${KUBE_ROOT}/cluster/kubectl.sh" get componentstatuses -o template --template='{{range .items}}{{with index .conditions 0}}{{.type}}:{{.status}},{{end}}{{end}}' --api-version=v1) || true cs_status=$("${KUBE_ROOT}/cluster/kubectl.sh" get componentstatuses -o template --template='{{range .items}}{{with index .conditions 0}}{{.type}}:{{.status}},{{end}}{{end}}') || true
componentstatuses=$(echo "${cs_status}" | tr "," "\n" | grep -c 'Healthy:') || true componentstatuses=$(echo "${cs_status}" | tr "," "\n" | grep -c 'Healthy:') || true
healthy=$(echo "${cs_status}" | tr "," "\n" | grep -c 'Healthy:True') || true healthy=$(echo "${cs_status}" | tr "," "\n" | grep -c 'Healthy:True') || true