Skip to content

Commit

Permalink
fix tfctl bash completion when kubeconfig does not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrand committed Feb 27, 2023
1 parent 630ebb3 commit f88ed22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ USER root
ARG DEBIAN_FRONTEND=noninteractive

#--- Clis versions
ENV ARGO_CLI_VERSION="3.4.3" \
ENV ARGO_CLI_VERSION="3.4.5" \
BBR_VERSION="1.9.38" \
BOSH_CLI_VERSION="7.1.2" \
BOSH_CLI_VERSION="7.1.3" \
BOSH_CLI_COMPLETION_VERSION="1.2.0" \
BOSH_GEN_VERSION="0.101.2" \
CF_CLI_VERSION="8.5.0" \
CF_UAAC_VERSION="4.14.0" \
CREDHUB_VERSION="2.9.10" \
CREDHUB_VERSION="2.9.11" \
FLUX_VERSION="0.33.0" \
FLY_VERSION="7.8.2" \
GOVC_VERSION="0.30.2" \
Expand All @@ -24,7 +24,7 @@ ENV ARGO_CLI_VERSION="3.4.3" \
KUBECTL_VERSION="1.23.9" \
KUBECTL_WHOAMI_VERSION="0.0.44" \
KUSTOMIZE_VERSION="4.5.7" \
K9S_VERSION="0.27.2" \
K9S_VERSION="0.27.3" \
MONGO_SHELL_VERSION="4.0.25" \
MYSQL_SHELL_VERSION="8.0.25-1" \
OC_CLI_VERSION="4.10.25" \
Expand Down Expand Up @@ -145,7 +145,7 @@ RUN printf '\n=====================================================\n Install sy
printf '\n=====================================================\n Set system banner\n=====================================================\n' && \
printf '\nYour are logged into an ubuntu docker tools container :' > /etc/motd && \
printf '\n- "tools" command display available tools.' >> /etc/motd && \
printf '\n- All path except "/data/shared" are not persistant (do not save data on it).\n\n' >> /etc/motd && \
printf '\n- "/data" is the only persistant volume (do not save data on other fs).\n\n' >> /etc/motd && \
chmod 644 /etc/motd && \
printf '\n=====================================================\n Configure user account\n=====================================================\n' && \
mv /tmp/bosh-cli/profile /home/bosh/.profile && chmod 664 /home/bosh/.profile && \
Expand Down
6 changes: 4 additions & 2 deletions bosh-cli/bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ export GREP_COLORS="fn=1;34:se=1;34:mt=1;33"
#--- bosh cli completion
source <(/home/bosh/bosh-complete-linux bash-source)

#--- tfctl cli completion
source <(tfctl completion bash)
#--- tfctl cli completion (uses kubeconfig file)
if [ -f ${HOME}/.kube/config ] ; then
source <(tfctl completion bash)
fi

#--- kubectl plugin completion
source <(kubectl get-all completion bash | sed -e "s+ get-all$+ kubectl-get_all+g")
Expand Down
2 changes: 1 addition & 1 deletion bosh-cli/log-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if [ ${flagError} = 0 ] ; then
if [ "${SITE_NAME}" = "fe-int" ] ; then
MAX_ITEMS=7
else
MAX_ITEMS=6
MAX_ITEMS=5
fi

for value in $(seq 1 ${MAX_ITEMS}) ; do
Expand Down

0 comments on commit f88ed22

Please sign in to comment.