X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Fk8s_setup%2Fk8s_config_pre.sh;h=38e71d234e858e7934e2bb5478dcdddf85bf3962;hb=071c4d95f28ac00cda1ed5dba9a4bf209b7a66ab;hp=f41ba78d7ffd6937760ebab1427460a9d0985ce0;hpb=976ebf4916c7c6487bf98d8c14f985ff9c2dabac;p=bottlenecks.git diff --git a/utils/k8s_setup/k8s_config_pre.sh b/utils/k8s_setup/k8s_config_pre.sh index f41ba78d..38e71d23 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@192.16.1.222:~/.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