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() {
|
read_generated_password() {
|
||||||
local username="$1"
|
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() {
|
write_authorized_keys() {
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ spec:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
containers:
|
containers:
|
||||||
- name: k8s-mgmt-pod
|
- name: k8s-mgmt-pod
|
||||||
image: git.alcatrash.net/michael/k8s-mgmt-pod/k8s-mgmt-pod:v1.0.0
|
image: git.alcatrash.net/michael/k8s-mgmt-pod/k8s-mgmt-pod:latest
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- name: ssh
|
- name: ssh
|
||||||
containerPort: 22
|
containerPort: 22
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue