fix(infra): pin minio/mc tags + add postgres securityContext + harden bootstrap script
All checks were successful
AI Code Review / ai-review (pull_request) Successful in 15s
All checks were successful
AI Code Review / ai-review (pull_request) Successful in 15s
Address ai-review feedback on PR #17: - Pin quay.io/minio/minio and mc to specific RELEASE tags (Renovate will bump). 'latest' is unpredictable in GitOps. - Bootstrap script: set -e -> set -euo pipefail. - Postgres container: runAsNonRoot, uid/gid 999, drop ALL caps, no privilege escalation. Matches PSS restricted profile.
This commit is contained in:
@@ -45,7 +45,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: minio
|
- name: minio
|
||||||
image: quay.io/minio/minio:latest
|
image: quay.io/minio/minio:RELEASE.2024-12-18T13-15-44Z
|
||||||
args:
|
args:
|
||||||
- server
|
- server
|
||||||
- /data
|
- /data
|
||||||
@@ -121,7 +121,7 @@ spec:
|
|||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
containers:
|
containers:
|
||||||
- name: mc
|
- name: mc
|
||||||
image: quay.io/minio/mc:latest
|
image: quay.io/minio/mc:RELEASE.2024-11-21T17-21-54Z
|
||||||
env:
|
env:
|
||||||
- name: MINIO_ROOT_USER
|
- name: MINIO_ROOT_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@@ -137,7 +137,7 @@ spec:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
set -e
|
set -euo pipefail
|
||||||
until mc alias set local http://forte-drop-minio:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD" 2>/dev/null; do
|
until mc alias set local http://forte-drop-minio:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD" 2>/dev/null; do
|
||||||
echo "waiting for minio..."
|
echo "waiting for minio..."
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|||||||
@@ -43,6 +43,13 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
image: postgres:16-alpine
|
image: postgres:16-alpine
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 999
|
||||||
|
runAsGroup: 999
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop: [ALL]
|
||||||
ports:
|
ports:
|
||||||
- name: tcp-postgresql
|
- name: tcp-postgresql
|
||||||
containerPort: 5432
|
containerPort: 5432
|
||||||
|
|||||||
Reference in New Issue
Block a user