Update entrypoint.sh to prevent failure on missing password entry and modify deployment.yaml to use latest image tag with Always pull policy

This commit is contained in:
Michael Trip 2026-06-23 15:29:06 +02:00
parent f45693aff4
commit edfe160b4f
2 changed files with 4 additions and 3 deletions

View file

@ -70,7 +70,8 @@ store_generated_password() {
read_generated_password() {
local username="$1"
grep -E "^${username}=" "${GENERATED_PASSWORDS_FILE}" | tail -n 1 | cut -d '=' -f 2-
# Return an empty string if no entry exists; never fail under `set -euo pipefail`.
awk -F '=' -v username="${username}" '$1 == username { value = substr($0, index($0, "=") + 1) } END { if (value != "") print value }' "${GENERATED_PASSWORDS_FILE}"
}
write_authorized_keys() {