X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=bottlenecks.git;a=blobdiff_plain;f=utils%2Fk8s_setup%2Fk8s_config_pre.sh;h=38e71d234e858e7934e2bb5478dcdddf85bf3962;hp=96f714bfea822676287a7b43a0447d6d4e073ac6;hb=071c4d95f28ac00cda1ed5dba9a4bf209b7a66ab;hpb=d06192b9ff24020cc20f903d939714e2a09a86c2 diff --git a/utils/k8s_setup/k8s_config_pre.sh b/utils/k8s_setup/k8s_config_pre.sh index 96f714bf..38e71d23 100644 --- a/utils/k8s_setup/k8s_config_pre.sh +++ b/utils/k8s_setup/k8s_config_pre.sh @@ -64,3 +64,17 @@ if [[ ${INSTALLER_TYPE} == 'compass' ]]; then else echo "BOTTLENECKS EROOR: unrecognized installer" fi + +if [[ -f ${K8S_CONFIG} ]]; then + if [[ -d ~/.kube ]]; then + cp ${K8S_CONFIG} ~/.kube/config + echo "BOTTLENECKS INFO: copying k8s config to ~./kube" + else + mkdir ~/.kube + cp ${K8S_CONFIG} ~/.kube/config + echo "BOTTLENECKS INFO: copying k8s config to ~./kube" + fi +else + echo "BOTTLENECKS ERROR: k8s config file does no exit (${K8S_CONFIG})" + exit 1 +fi