X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Fk8s_setup%2Fk8s_config_pre.sh;h=01def4d12ea2b3fd5d77f5d2f801c02531c44e87;hb=302c1958a98a704fef7b47f37d1ce2fc0016ba95;hp=05c3f1c348ca877e3ce0cce616f364f11660badf;hpb=a68e520aa204057064ff2e20b76003f8cb9126f5;p=bottlenecks.git diff --git a/utils/k8s_setup/k8s_config_pre.sh b/utils/k8s_setup/k8s_config_pre.sh index 05c3f1c3..01def4d1 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