add k8s context env
This commit is contained in:
parent
3f40845111
commit
39db40cd5e
1 changed files with 5 additions and 6 deletions
|
@ -51,21 +51,20 @@ fun Prov.installKubectl(): ProvResult = def {
|
|||
then
|
||||
export KUBECONFIG="$DEFAULT_KUBE_CONTEXTS"
|
||||
fi
|
||||
|
||||
# Additional contexts should be in ~/.kube/custom-contexts/
|
||||
|
||||
# Additional contexts should be in ~/.kube/custom-contexts/
|
||||
CUSTOM_KUBE_CONTEXTS="$HOME/.kube/custom-contexts"
|
||||
mkdir -p "${CUSTOM_KUBE_CONTEXTS}"
|
||||
|
||||
|
||||
OIFS="$IFS"
|
||||
IFS=${'$'}'\n'
|
||||
for contextFile in `find "${CUSTOM_KUBE_CONTEXTS}" -type f -name "*.yml"`
|
||||
IFS=$'\n'
|
||||
for contextFile in `find "${CUSTOM_KUBE_CONTEXTS}" -type f -name "*.yml"`
|
||||
do
|
||||
export KUBECONFIG="$contextFile:$KUBECONFIG"
|
||||
done
|
||||
IFS="$OIFS"
|
||||
|
||||
""".trimIndent()
|
||||
createFile(kubeConfigFile, kubeConfig, "640")
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue