Update kubeconfig handling in entrypoint script for better clarity
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 53s

This commit is contained in:
Michael Trip 2026-06-29 09:14:20 +02:00
parent 68c6789ac4
commit b6f7d1e1b7
2 changed files with 9 additions and 2 deletions

View file

@ -71,6 +71,8 @@ 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.
When both are available, the bootstrap kubeconfig is applied after the service-account kubeconfig and therefore takes precedence.
Start it with:
```bash

View file

@ -291,8 +291,13 @@ EOF
prepare_runtime() {
mkdir -p /var/run/sshd
ensure_host_keys
install_serviceaccount_kubeconfig
if [[ "${ENABLE_BOOTSTRAP_KUBECONFIG}" == "true" ]]; then
log "Kubeconfig mode: bootstrap-only (serviceaccount kubeconfig generation disabled)."
install_bootstrap_kubeconfig
else
log "Kubeconfig mode: in-cluster serviceaccount."
install_serviceaccount_kubeconfig
fi
persist_kubernetes_login_env
configure_user_auth admin ADMIN_SSH_PUBKEY ADMIN_PASSWORD
configure_user_auth user USER_SSH_PUBKEY USER_PASSWORD