mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Remove several red herring error messages in GCE cluster scripts
This commit is contained in:
parent
743e0689cc
commit
7a7cbcffd3
@ -147,15 +147,15 @@ function clear-kubeconfig() {
|
||||
fi
|
||||
|
||||
local kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||
"${kubectl}" config unset "clusters.${CONTEXT}"
|
||||
"${kubectl}" config unset "users.${CONTEXT}"
|
||||
"${kubectl}" config unset "users.${CONTEXT}-basic-auth"
|
||||
"${kubectl}" config unset "contexts.${CONTEXT}"
|
||||
|
||||
# Unset the current-context before we delete it, as otherwise kubectl errors.
|
||||
local cc=$("${kubectl}" config view -o jsonpath='{.current-context}')
|
||||
if [[ "${cc}" == "${CONTEXT}" ]]; then
|
||||
"${kubectl}" config unset current-context
|
||||
fi
|
||||
"${kubectl}" config unset "clusters.${CONTEXT}"
|
||||
"${kubectl}" config unset "users.${CONTEXT}"
|
||||
"${kubectl}" config unset "users.${CONTEXT}-basic-auth"
|
||||
"${kubectl}" config unset "contexts.${CONTEXT}"
|
||||
|
||||
echo "Cleared config for ${CONTEXT} from ${KUBECONFIG}"
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ function upload-server-tars() {
|
||||
local staging_bucket="gs://kubernetes-staging-${project_hash}${suffix}"
|
||||
|
||||
# Ensure the buckets are created
|
||||
if ! gsutil ls "${staging_bucket}" ; then
|
||||
if ! gsutil ls "${staging_bucket}" >/dev/null; then
|
||||
echo "Creating ${staging_bucket}"
|
||||
gsutil mb -l "${region}" "${staging_bucket}"
|
||||
fi
|
||||
@ -1161,6 +1161,7 @@ function check-cluster() {
|
||||
# returns the result of ssh command which removes replica
|
||||
function remove-replica-from-etcd() {
|
||||
local -r port="${1}"
|
||||
[[ -n "${EXISTING_MASTER_NAME}" ]] || return
|
||||
gcloud compute ssh "${EXISTING_MASTER_NAME}" \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${EXISTING_MASTER_ZONE}" \
|
||||
|
Loading…
Reference in New Issue
Block a user