diff options
author | 2018-09-17 08:37:18 +0000 | |
---|---|---|
committer | 2018-09-17 08:37:18 +0000 | |
commit | 4a94df533b4ae139af5e222e29375c19c7ace015 (patch) | |
tree | 7dd9c900f902de71932264765ea151f535ff02f5 /utils/k8s_setup/k8s_config_pre.sh | |
parent | cc1b900df59b0da1cbeead132b1260787c3998d4 (diff) | |
parent | 071c4d95f28ac00cda1ed5dba9a4bf209b7a66ab (diff) |
Merge "bug-fix: kubectl not installed in Bottlenecks docker"
Diffstat (limited to 'utils/k8s_setup/k8s_config_pre.sh')
-rw-r--r-- | utils/k8s_setup/k8s_config_pre.sh | 14 |
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 96f714bf..38e71d23 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 |