summaryrefslogtreecommitdiffstats
path: root/utils/k8s_setup/k8s_config_pre.sh
diff options
context:
space:
mode:
authorYang (Gabriel) Yu <Gabriel.yuyang@huawei.com>2018-09-17 16:17:20 +0800
committerYang (Gabriel) Yu <Gabriel.yuyang@huawei.com>2019-02-21 12:26:47 +0000
commit302c1958a98a704fef7b47f37d1ce2fc0016ba95 (patch)
treee6e1c9fb39e7aef7722ec09246056b8b9e35643f /utils/k8s_setup/k8s_config_pre.sh
parenta68e520aa204057064ff2e20b76003f8cb9126f5 (diff)
bug-fix: kubectl not installed in Bottlenecks docker
JIRA: BOTTLENECK-246 Resulting in falure in executing k8s capacity test in Bottlenecks CI Change-Id: Ibf94ccc3d9ce6963ddbc76f8e2168b3a841e347b Signed-off-by: Yang (Gabriel) Yu <Gabriel.yuyang@huawei.com> (cherry picked from commit 071c4d95f28ac00cda1ed5dba9a4bf209b7a66ab)
Diffstat (limited to 'utils/k8s_setup/k8s_config_pre.sh')
-rw-r--r--utils/k8s_setup/k8s_config_pre.sh14
1 files changed, 14 insertions, 0 deletions
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