Update kubeconfig handling in entrypoint script for better clarity
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 53s
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 53s
This commit is contained in:
parent
68c6789ac4
commit
b6f7d1e1b7
2 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue