# 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.
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