mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Merge pull request #6377 from nikhiljindal/kubevtl
Updating components to use v1beta3
This commit is contained in:
@@ -165,7 +165,7 @@ function wait-cluster-readiness {
|
||||
|
||||
local timeout=50
|
||||
while [[ $timeout -ne 0 ]]; do
|
||||
nb_ready_minions=$("${kubectl}" get minions -o template -t "{{range.items}}{{range.status.conditions}}{{.kind}}{{end}}:{{end}}" 2>/dev/null | tr ':' '\n' | grep -c Ready || true)
|
||||
nb_ready_minions=$("${kubectl}" get minions -o template -t "{{range.items}}{{range.status.conditions}}{{.kind}}{{end}}:{{end}}" --api-version=v1beta1 2>/dev/null | tr ':' '\n' | grep -c Ready || true)
|
||||
echo "Nb ready minions: $nb_ready_minions / $NUM_MINIONS"
|
||||
if [[ "$nb_ready_minions" -eq "$NUM_MINIONS" ]]; then
|
||||
return 0
|
||||
|
@@ -165,7 +165,7 @@ function verify-cluster {
|
||||
local count="0"
|
||||
until [[ "$count" == "1" ]]; do
|
||||
local minions
|
||||
minions=$("${KUBE_ROOT}/cluster/kubectl.sh" get minions -o template -t '{{range.items}}{{.id}}:{{end}}')
|
||||
minions=$("${KUBE_ROOT}/cluster/kubectl.sh" get minions -o template -t '{{range.items}}{{.id}}:{{end}}' --api-version=v1beta1)
|
||||
count=$(echo $minions | grep -c "${MINION_IPS[i]}") || {
|
||||
printf "."
|
||||
sleep 2
|
||||
@@ -179,7 +179,7 @@ function verify-cluster {
|
||||
vagrant ssh master --command "kubectl get pods" || {
|
||||
echo "WARNING: kubectl to localhost failed. This could mean localhost is not bound to an IP"
|
||||
}
|
||||
|
||||
|
||||
(
|
||||
echo
|
||||
echo "Kubernetes cluster is running. The master is running at:"
|
||||
|
@@ -37,7 +37,7 @@ trap 'rm -rf "${MINIONS_FILE}"' EXIT
|
||||
# Make several attempts to deal with slow cluster birth.
|
||||
attempt=0
|
||||
while true; do
|
||||
"${KUBE_ROOT}/cluster/kubectl.sh" get minions -o template -t $'{{range.items}}{{.id}}\n{{end}}' > "${MINIONS_FILE}"
|
||||
"${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o template -t $'{{range.items}}{{.metadata.name}}\n{{end}}' --api-version=v1beta3 > "${MINIONS_FILE}"
|
||||
found=$(grep -c . "${MINIONS_FILE}")
|
||||
if [[ ${found} == "${NUM_MINIONS}" ]]; then
|
||||
break
|
||||
|
Reference in New Issue
Block a user