mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
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:
parent
435bc35812
commit
902a04d637
@ -89,7 +89,7 @@ while true; do
|
||||
# Echo the output and gather 2 counts:
|
||||
# - Total number of componentstatuses.
|
||||
# - 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
|
||||
healthy=$(echo "${cs_status}" | tr "," "\n" | grep -c 'Healthy:True') || true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user