Commit 2673ce4c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #26244 from asalkeld/kconfig-common.sh

Automatic merge from submit-queue Teach create-kubeconfig() to deal with multi path KUBECONFIG When KUBECONFIG is in the form "A:B:C" make sure each file is created. fixes #17778
parents b73aa599 f52fc541
...@@ -71,10 +71,16 @@ function create-kubeconfig() { ...@@ -71,10 +71,16 @@ function create-kubeconfig() {
fi fi
# KUBECONFIG determines the file we write to, but it may not exist yet # KUBECONFIG determines the file we write to, but it may not exist yet
if [[ ! -e "${KUBECONFIG}" ]]; then OLD_IFS=$IFS
mkdir -p $(dirname "${KUBECONFIG}") IFS=':'
touch "${KUBECONFIG}" for cfg in ${KUBECONFIG} ; do
fi if [[ ! -e "${cfg}" ]]; then
mkdir -p "$(dirname "${cfg}")"
touch "${cfg}"
fi
done
IFS=$OLD_IFS
local cluster_args=( local cluster_args=(
"--server=${KUBE_SERVER:-https://${KUBE_MASTER_IP}}" "--server=${KUBE_SERVER:-https://${KUBE_MASTER_IP}}"
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment