mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Add missing gcloud --project flags introduced by PR 9016
This commit is contained in:
parent
b3ab7d8db4
commit
58885c7b48
@ -751,7 +751,7 @@ function kube-down {
|
|||||||
while [[ "$deleteCmdStatus" != "DONE" ]]
|
while [[ "$deleteCmdStatus" != "DONE" ]]
|
||||||
do
|
do
|
||||||
sleep 5
|
sleep 5
|
||||||
deleteCmdOperationOutput=$(gcloud preview managed-instance-groups --zone "${ZONE}" get-operation $deleteCmdOperationId)
|
deleteCmdOperationOutput=$(gcloud preview managed-instance-groups --zone "${ZONE}" --project "${PROJECT}" get-operation $deleteCmdOperationId)
|
||||||
deleteCmdStatus=$(echo $deleteCmdOperationOutput | grep -i "status:" | sed "s/.*status:[[:space:]]*\([^[:space:]]*\).*/\1/g")
|
deleteCmdStatus=$(echo $deleteCmdOperationOutput | grep -i "status:" | sed "s/.*status:[[:space:]]*\([^[:space:]]*\).*/\1/g")
|
||||||
echo "Waiting for MIG deletion to complete. Current status: " $deleteCmdStatus
|
echo "Waiting for MIG deletion to complete. Current status: " $deleteCmdStatus
|
||||||
done
|
done
|
||||||
@ -759,7 +759,7 @@ function kube-down {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if gcloud compute instance-templates describe "${NODE_INSTANCE_PREFIX}-template" &>/dev/null; then
|
if gcloud compute instance-templates describe --project "${PROJECT}" "${NODE_INSTANCE_PREFIX}-template" &>/dev/null; then
|
||||||
gcloud compute instance-templates delete \
|
gcloud compute instance-templates delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--quiet \
|
--quiet \
|
||||||
@ -767,7 +767,7 @@ function kube-down {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# First delete the master (if it exists).
|
# First delete the master (if it exists).
|
||||||
if gcloud compute instances describe "${MASTER_NAME}" --zone "${ZONE}" &>/dev/null; then
|
if gcloud compute instances describe "${MASTER_NAME}" --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then
|
||||||
gcloud compute instances delete \
|
gcloud compute instances delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--quiet \
|
--quiet \
|
||||||
@ -777,7 +777,7 @@ function kube-down {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete the master pd (possibly leaked by kube-up if master create failed).
|
# Delete the master pd (possibly leaked by kube-up if master create failed).
|
||||||
if gcloud compute disks describe "${MASTER_NAME}"-pd --zone "${ZONE}" &>/dev/null; then
|
if gcloud compute disks describe "${MASTER_NAME}"-pd --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then
|
||||||
gcloud compute disks delete \
|
gcloud compute disks delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--quiet \
|
--quiet \
|
||||||
@ -804,7 +804,7 @@ function kube-down {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Delete firewall rule for the master.
|
# Delete firewall rule for the master.
|
||||||
if gcloud compute firewall-rules describe "${MASTER_NAME}-https" &>/dev/null; then
|
if gcloud compute firewall-rules describe --project "${PROJECT}" "${MASTER_NAME}-https" &>/dev/null; then
|
||||||
gcloud compute firewall-rules delete \
|
gcloud compute firewall-rules delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--quiet \
|
--quiet \
|
||||||
@ -812,7 +812,7 @@ function kube-down {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete firewall rule for minions.
|
# Delete firewall rule for minions.
|
||||||
if gcloud compute firewall-rules describe "${MINION_TAG}-all" &>/dev/null; then
|
if gcloud compute firewall-rules describe "${PROJECT}" "${MINION_TAG}-all" &>/dev/null; then
|
||||||
gcloud compute firewall-rules delete \
|
gcloud compute firewall-rules delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--quiet \
|
--quiet \
|
||||||
@ -836,7 +836,7 @@ function kube-down {
|
|||||||
|
|
||||||
# Delete the master's reserved IP
|
# Delete the master's reserved IP
|
||||||
local REGION=${ZONE%-*}
|
local REGION=${ZONE%-*}
|
||||||
if gcloud compute addresses describe "${MASTER_NAME}-ip" --region "${REGION}" &>/dev/null; then
|
if gcloud compute addresses describe "${MASTER_NAME}-ip" --region "${REGION}" --project "${PROJECT}" &>/dev/null; then
|
||||||
gcloud compute addresses delete \
|
gcloud compute addresses delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--region "${REGION}" \
|
--region "${REGION}" \
|
||||||
@ -992,11 +992,11 @@ function test-setup {
|
|||||||
"${MINION_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || true
|
"${MINION_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || true
|
||||||
# As there is no simple way to wait longer for this operation we need to manually
|
# As there is no simple way to wait longer for this operation we need to manually
|
||||||
# wait some additional time (20 minutes altogether).
|
# wait some additional time (20 minutes altogether).
|
||||||
until gcloud compute firewall-rules describe "${MINION_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || [ $(($start + 1200)) -lt `date +%s` ]
|
until gcloud compute firewall-rules describe --project "${PROJECT}" "${MINION_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || [ $(($start + 1200)) -lt `date +%s` ]
|
||||||
do sleep 5
|
do sleep 5
|
||||||
done
|
done
|
||||||
# Check if the firewall rule exists and fail if it does not.
|
# Check if the firewall rule exists and fail if it does not.
|
||||||
gcloud compute firewall-rules describe "${MINION_TAG}-${INSTANCE_PREFIX}-http-alt"
|
gcloud compute firewall-rules describe --project "${PROJECT}" "${MINION_TAG}-${INSTANCE_PREFIX}-http-alt"
|
||||||
|
|
||||||
# Open up the NodePort range
|
# Open up the NodePort range
|
||||||
# TODO(justinsb): Move to main setup, if we decide whether we want to do this by default.
|
# TODO(justinsb): Move to main setup, if we decide whether we want to do this by default.
|
||||||
@ -1009,11 +1009,11 @@ function test-setup {
|
|||||||
"${MINION_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || true
|
"${MINION_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || true
|
||||||
# As there is no simple way to wait longer for this operation we need to manually
|
# As there is no simple way to wait longer for this operation we need to manually
|
||||||
# wait some additional time (20 minutes altogether).
|
# wait some additional time (20 minutes altogether).
|
||||||
until gcloud compute firewall-rules describe "${MINION_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || [ $(($start + 1200)) -lt `date +%s` ]
|
until gcloud compute firewall-rules describe --project "${PROJECT}" "${MINION_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || [ $(($start + 1200)) -lt `date +%s` ]
|
||||||
do sleep 5
|
do sleep 5
|
||||||
done
|
done
|
||||||
# Check if the firewall rule exists and fail if it does not.
|
# Check if the firewall rule exists and fail if it does not.
|
||||||
gcloud compute firewall-rules describe "${MINION_TAG}-${INSTANCE_PREFIX}-nodeports"
|
gcloud compute firewall-rules describe --project "${PROJECT}" "${MINION_TAG}-${INSTANCE_PREFIX}-nodeports"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Execute after running tests to perform any required clean-up. This is called
|
# Execute after running tests to perform any required clean-up. This is called
|
||||||
|
Loading…
Reference in New Issue
Block a user