Add kubectx and kubens support to Dockerfile and bash completion scripts
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 1m23s
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 1m23s
This commit is contained in:
parent
d582311917
commit
df0eaf0a21
4 changed files with 23 additions and 3 deletions
12
Dockerfile
12
Dockerfile
|
|
@ -32,6 +32,8 @@ ARG HELM_VERSION=3.21.2
|
|||
ARG K9S_VERSION=0.51.0
|
||||
# renovate: datasource=github-releases depName=int128/kubelogin
|
||||
ARG OIDC_LOGIN_VERSION=1.36.2
|
||||
# renovate: datasource=github-tags depName=ahmetb/kubectx
|
||||
ARG KUBECTX_VERSION=0.9.5
|
||||
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
|
|
@ -54,9 +56,12 @@ RUN apt-get update \
|
|||
bash-completion \
|
||||
ca-certificates \
|
||||
curl \
|
||||
jq \
|
||||
locales \
|
||||
unzip \
|
||||
tar \
|
||||
vim \
|
||||
yq \
|
||||
nginx-light \
|
||||
netcat-openbsd \
|
||||
openssh-client \
|
||||
|
|
@ -93,10 +98,15 @@ RUN apt-get update \
|
|||
&& sed 's#\*kubelogin_linux_amd64.zip$#*/tmp/kubelogin_linux_amd64.zip#' /tmp/kubelogin_linux_amd64.zip.sha256 | sha256sum -c - \
|
||||
&& unzip -p /tmp/kubelogin_linux_amd64.zip kubelogin > /usr/local/bin/kubectl-oidc_login \
|
||||
&& chmod 0755 /usr/local/bin/kubectl-oidc_login \
|
||||
&& curl -fsSLo /usr/local/bin/kubectx "https://raw.githubusercontent.com/ahmetb/kubectx/v${KUBECTX_VERSION}/kubectx" \
|
||||
&& curl -fsSLo /usr/local/bin/kubens "https://raw.githubusercontent.com/ahmetb/kubectx/v${KUBECTX_VERSION}/kubens" \
|
||||
&& chmod 0755 /usr/local/bin/kubectx /usr/local/bin/kubens \
|
||||
&& mkdir -p /etc/bash_completion.d \
|
||||
&& curl -fsSLo /etc/bash_completion.d/kubectx "https://raw.githubusercontent.com/ahmetb/kubectx/v${KUBECTX_VERSION}/completion/kubectx.bash" \
|
||||
&& curl -fsSLo /etc/bash_completion.d/kubens "https://raw.githubusercontent.com/ahmetb/kubectx/v${KUBECTX_VERSION}/completion/kubens.bash" \
|
||||
&& kubectl completion bash > /etc/bash_completion.d/kubectl \
|
||||
&& helm completion bash > /etc/bash_completion.d/helm \
|
||||
&& chmod 0644 /etc/bash_completion.d/kubectl /etc/bash_completion.d/helm \
|
||||
&& chmod 0644 /etc/bash_completion.d/kubectl /etc/bash_completion.d/helm /etc/bash_completion.d/kubectx /etc/bash_completion.d/kubens \
|
||||
&& sed -i 's/^# *en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& locale-gen en_US.UTF-8 \
|
||||
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue