Prepare private pgpass in region init container
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (deploy) (push) Canceled after 1m43s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (deploy) (push) Canceled after 1m43s
This commit is contained in:
@@ -42,17 +42,29 @@ spec:
|
|||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
fsGroupChangePolicy: Always
|
fsGroupChangePolicy: Always
|
||||||
seccompProfile: {type: RuntimeDefault}
|
seccompProfile: {type: RuntimeDefault}
|
||||||
|
initContainers:
|
||||||
|
- name: prepare-pgpass
|
||||||
|
image: aevolution-server
|
||||||
|
command: ["/bin/bash", "-c"]
|
||||||
|
args: ["set -eu; umask 077; cp /run/postgres/pgpass /tmp/pgpass; chmod 0600 /tmp/pgpass"]
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
runAsNonRoot: false
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
capabilities: {drop: [ALL]}
|
||||||
|
volumeMounts:
|
||||||
|
- {name: connection, mountPath: /run/postgres, readOnly: true}
|
||||||
|
- {name: scratch, mountPath: /tmp}
|
||||||
containers:
|
containers:
|
||||||
- name: evo-server
|
- name: evo-server
|
||||||
image: aevolution-server
|
image: aevolution-server
|
||||||
# libpq ignores group-readable password files: copy to private memory, then
|
# The init container copies pgpass to private memory, then exec so evo-server is PID 1 and receives SIGTERM directly.
|
||||||
# exec so evo-server is PID 1 and receives SIGTERM directly.
|
|
||||||
command: ["/bin/bash", "-c"]
|
command: ["/bin/bash", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
set -eu
|
set -eu
|
||||||
umask 077
|
|
||||||
cp /run/postgres/pgpass /tmp/pgpass
|
|
||||||
# Builds that wrote this region's history stay recoverable (ADR-0068).
|
# Builds that wrote this region's history stay recoverable (ADR-0068).
|
||||||
retained=()
|
retained=()
|
||||||
for build in $REGION_RETAINED; do retained+=(--retained "$build"); done
|
for build in $REGION_RETAINED; do retained+=(--retained "$build"); done
|
||||||
|
|||||||
Reference in New Issue
Block a user