Compare commits
1 commit
62d68bea0c
...
e54094056d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e54094056d |
3 changed files with 2 additions and 19 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -30,8 +30,6 @@ ARG KUBECTL_VERSION=1.36.2
|
||||||
ARG HELM_VERSION=3.21.2
|
ARG HELM_VERSION=3.21.2
|
||||||
# renovate: datasource=github-releases depName=derailed/k9s
|
# renovate: datasource=github-releases depName=derailed/k9s
|
||||||
ARG K9S_VERSION=0.51.0
|
ARG K9S_VERSION=0.51.0
|
||||||
# renovate: datasource=github-releases depName=int128/kubelogin
|
|
||||||
ARG OIDC_LOGIN_VERSION=1.34.0
|
|
||||||
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
|
|
@ -51,7 +49,6 @@ RUN apt-get update \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
unzip \
|
|
||||||
tar \
|
tar \
|
||||||
nginx-light \
|
nginx-light \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
|
|
@ -84,11 +81,6 @@ RUN apt-get update \
|
||||||
&& curl -fsSLo "/tmp/k9s_Linux_amd64.tar.gz" "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_amd64.tar.gz" \
|
&& curl -fsSLo "/tmp/k9s_Linux_amd64.tar.gz" "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_amd64.tar.gz" \
|
||||||
&& tar -xzf "/tmp/k9s_Linux_amd64.tar.gz" -C /tmp \
|
&& tar -xzf "/tmp/k9s_Linux_amd64.tar.gz" -C /tmp \
|
||||||
&& install -m 0755 /tmp/k9s /usr/local/bin/k9s \
|
&& install -m 0755 /tmp/k9s /usr/local/bin/k9s \
|
||||||
&& curl -fsSLo "/tmp/kubelogin_linux_amd64.zip" "https://github.com/int128/kubelogin/releases/download/v${OIDC_LOGIN_VERSION}/kubelogin_linux_amd64.zip" \
|
|
||||||
&& curl -fsSLo "/tmp/kubelogin_linux_amd64.zip.sha256" "https://github.com/int128/kubelogin/releases/download/v${OIDC_LOGIN_VERSION}/kubelogin_linux_amd64.zip.sha256" \
|
|
||||||
&& 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 \
|
|
||||||
&& mkdir -p /etc/bash_completion.d \
|
&& mkdir -p /etc/bash_completion.d \
|
||||||
&& kubectl completion bash > /etc/bash_completion.d/kubectl \
|
&& kubectl completion bash > /etc/bash_completion.d/kubectl \
|
||||||
&& helm completion bash > /etc/bash_completion.d/helm \
|
&& helm completion bash > /etc/bash_completion.d/helm \
|
||||||
|
|
@ -101,8 +93,6 @@ RUN apt-get update \
|
||||||
/tmp/k9s \
|
/tmp/k9s \
|
||||||
/tmp/README.md \
|
/tmp/README.md \
|
||||||
/tmp/LICENSE \
|
/tmp/LICENSE \
|
||||||
/tmp/kubelogin_linux_amd64.zip \
|
|
||||||
/tmp/kubelogin_linux_amd64.zip.sha256 \
|
|
||||||
/tmp/k9s_Linux_amd64.tar.gz \
|
/tmp/k9s_Linux_amd64.tar.gz \
|
||||||
&& rm -f /etc/ssh/ssh_host_* \
|
&& rm -f /etc/ssh/ssh_host_* \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,6 @@ The included [docker-compose.yaml](docker-compose.yaml) enables kubeconfig boots
|
||||||
|
|
||||||
That bootstrap is explicitly opt-in and defaults to off in the container itself, so it does not run in Kubernetes unless you deliberately enable it.
|
That bootstrap is explicitly opt-in and defaults to off in the container itself, so it does not run in Kubernetes unless you deliberately enable it.
|
||||||
|
|
||||||
When both are available, the bootstrap kubeconfig is applied after the service-account kubeconfig and therefore takes precedence.
|
|
||||||
|
|
||||||
Start it with:
|
Start it with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -291,13 +291,8 @@ EOF
|
||||||
prepare_runtime() {
|
prepare_runtime() {
|
||||||
mkdir -p /var/run/sshd
|
mkdir -p /var/run/sshd
|
||||||
ensure_host_keys
|
ensure_host_keys
|
||||||
if [[ "${ENABLE_BOOTSTRAP_KUBECONFIG}" == "true" ]]; then
|
install_serviceaccount_kubeconfig
|
||||||
log "Kubeconfig mode: bootstrap-only (serviceaccount kubeconfig generation disabled)."
|
install_bootstrap_kubeconfig
|
||||||
install_bootstrap_kubeconfig
|
|
||||||
else
|
|
||||||
log "Kubeconfig mode: in-cluster serviceaccount."
|
|
||||||
install_serviceaccount_kubeconfig
|
|
||||||
fi
|
|
||||||
persist_kubernetes_login_env
|
persist_kubernetes_login_env
|
||||||
configure_user_auth admin ADMIN_SSH_PUBKEY ADMIN_PASSWORD
|
configure_user_auth admin ADMIN_SSH_PUBKEY ADMIN_PASSWORD
|
||||||
configure_user_auth user USER_SSH_PUBKEY USER_PASSWORD
|
configure_user_auth user USER_SSH_PUBKEY USER_PASSWORD
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue