X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Fk8s_setup%2Fk8s_config_pre.sh;h=f57add782bb1971ccdbc34e4b4cf38463377dc9d;hb=60188677ec3edd352ca1ff543c785d4e848122b5;hp=f41ba78d7ffd6937760ebab1427460a9d0985ce0;hpb=16d91f7832021bd446192d0025b58a6565bbd067;p=bottlenecks.git diff --git a/utils/k8s_setup/k8s_config_pre.sh b/utils/k8s_setup/k8s_config_pre.sh index f41ba78d..f57add78 100644 --- a/utils/k8s_setup/k8s_config_pre.sh +++ b/utils/k8s_setup/k8s_config_pre.sh @@ -7,7 +7,7 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -K8S_CONFIG="/tmp/k8s_conig" +K8S_CONFIG="/tmp/k8s_config" usage="Script to prepare kubenetes test configurations. @@ -59,8 +59,22 @@ while [[ $# > 0 ]] shift done -if [[ ${INSTALLER_TYPE} == 'compass' ]]; then - sshpass -p root scp root@192.16.1.222:~/.kube/config ${K8S_CONFIG} +if [[ ${INSTALLER_TYPE} == 'compass' ]]; then + sshpass -p root scp -o StrictHostKeyChecking=no root@10.1.0.50:~/.kube/config ${K8S_CONFIG} 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