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:
parent
f45693aff4
commit
edfe160b4f
2 changed files with 4 additions and 3 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ spec:
|
|||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: k8s-mgmt-pod
|
||||
image: git.alcatrash.net/michael/k8s-mgmt-pod/k8s-mgmt-pod:v1.0.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
image: git.alcatrash.net/michael/k8s-mgmt-pod/k8s-mgmt-pod:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: ssh
|
||||
containerPort: 22
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue