Sets seccompProfile.type: RuntimeDefault in the pod security context of minecraft-router, outline, urlaubsverwaltung, zipline, voucher-vault, satisfactory, patchmon and calibre-web-automated, so the container runtime's default syscall filter applies to every container in the pod. The value lives in the pod context rather than the container context because it covers init containers and any container added later without being repeated; a container that needs a different filter can still override it under securityContext.container, which wins over the pod value. Five of the eight also get the docker.io/ prefix on their previously unqualified image references, so the pull no longer depends on the runtime's default-registry setting: itzg/mc-router, outlinewiki/outline, urlaubsverwaltung/urlaubsverwaltung, l4rm4nd/vouchervault (twice, app and init container) and guacamole/guacd:1.6.0. zipline, satisfactory and calibre-web-automated were already qualified with ghcr.io. Verified in a throwaway k3d cluster against real application work, not just a Running pod, and with Seccomp: 2 (filter mode) read from /proc/<pid>/status inside each container: - minecraft-router: a Minecraft handshake for a mapped domain travels through the router to a backend and the backend's status payload comes back to the client. - outline: all migrations apply (45 tables), OIDC discovery succeeds and the server-rendered page answers 200 with <title>Outline</title>. - urlaubsverwaltung: Liquibase applies 79 changesets (35 tables), the app seeds its settings and vacation types, /login answers 200. - zipline: 27 migrations applied, then a full round trip - first user created, login, token, upload, and the file downloaded back byte-exact from the PVC. - voucher-vault: the init container's collectstatic output is served (200, 22 KB), Django has its 22 tables and uWSGI answers 200 with <title>VoucherVault</title>. - satisfactory: application behavior is NOT proven - the image is multiple GB and pulls 10 GB+ of game files on first start, which is why the chart sits in ci/excluded-charts.txt. What is proven is that the rendered pod securityContext is accepted server-side and yields Seccomp: 2 with uid/gid 1000 on a substitute image. - patchmon: both containers run under the pod profile and both report Seccomp: 2. The server applies 47 migrations (44 tables), connects to Postgres and Redis and serves its dashboard; guacd answers a real Guacamole "select rdp" instruction with its full args list, over the same 127.0.0.1:4822 path the chart wires up. - calibre-web-automated: the readOnlyRootFilesystem: false deviation is unaffected - id abc is still uid 1000 (not the 911 the image falls back to in read-only mode), /config and the Calibre metadata.db are owned by 1000, and both the root s6 init and the uid-1000 application report Seccomp: 2. calibredb 9.1 runs and adds a book. Its IPC worker prints a traceback while doing so, but an unconfined control pod on the same image prints the same class of traceback, so it is not the filter. trivy config now reports "0 to act on" for all eight; the untouched samba still shows KSV-0104 and KSV-0030, which confirms these charts are what closed the findings. No values.schema.json needed changing: in all eight schemas securityContext.pod is type ["object", "null"] with no property restrictions, so the new key validates as it stands. The #99 null paths still hold - nulling securityContext or securityContext.pod falls back to the defaults including the new one. Renovate resolves the prefixed guacd reference: a local dry-run lookup (renovate 44.40.1, --platform=local --dry-run=lookup) reports depName docker.io/guacamole/guacd against registryUrl https://index.docker.io with lookupName guacamole/guacd, currentVersion 1.6.0 and its real release timestamp, with no warnings. The other four prefixed references live in templates, which Renovate never reads - they are tracked by the customManagers via appVersion in Chart.yaml with a depName hardcoded in renovate.json5, so they are unaffected. Major bump for all eight: runtime behavior changes. Refs #84
222 lines
7.4 KiB
YAML
222 lines
7.4 KiB
YAML
# Scale the whole chart down without uninstalling it: scaleDown: true renders
|
|
# every Deployment/StatefulSet with replicas: 0 (and suspends CronJobs) and
|
|
# takes precedence over any per-workload replicas value. PVCs, Secrets and
|
|
# Services stay in place; scaleDown: false brings the workloads back up.
|
|
scaleDown: false
|
|
|
|
secrets:
|
|
voucherVaultSecretRef: null
|
|
oidcSecretRef: null
|
|
databaseSecretRef: null
|
|
|
|
voucherVault:
|
|
# Replica count for this workload; 0 is allowed and scales it down.
|
|
# The chart-global scaleDown flag takes precedence.
|
|
replicas: 1
|
|
resources:
|
|
# Limits are optional: memory and ephemeral-storage limits default to
|
|
# limitFactor x the request, an explicitly set limit always wins, and a
|
|
# CPU limit is only set when configured explicitly under "limits".
|
|
limitFactor: 3
|
|
requests:
|
|
cpu: 0.1
|
|
memory: 256Mi
|
|
# The static-files emptyDir (~90Mi of static assets, see the
|
|
# securityContext comment) counts toward the pod's ephemeral-storage
|
|
# usage, so the request must cover it.
|
|
ephemeral-storage: 128Mi
|
|
# "/" answers with a redirect for anonymous users, which httpGet treats as
|
|
# success. The Host header must be set to 127.0.0.1 because Django's
|
|
# ALLOWED_HOSTS only accepts 127.0.0.1 and the configured DOMAIN — probing
|
|
# with the default Host (the pod IP) would always return 400.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: 127.0.0.1
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: 127.0.0.1
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
# The startup probe gates liveness/readiness. Startup budget = 5s * 30 = 150s.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: 127.0.0.1
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
failureThreshold: 30
|
|
# The upstream image (l4rm4nd/vouchervault) runs as www-data (uid/gid 33).
|
|
# With readOnlyRootFilesystem the chart mounts emptyDirs over the paths the
|
|
# image writes at runtime: /tmp (upload/PDF scratch files), /opt/app/logs
|
|
# and STATIC_ROOT /opt/app/myapp/static (the entrypoint runs collectstatic
|
|
# at every start; an init container seeds the volume with the static files
|
|
# shipped in the image, because the directory doubles as the app's static
|
|
# source). Uploads and the database live on the PVC at /opt/app/database.
|
|
securityContext:
|
|
pod:
|
|
runAsNonRoot: true
|
|
runAsUser: 33
|
|
runAsGroup: 33
|
|
fsGroup: 33
|
|
fsGroupChangePolicy: Always
|
|
# RuntimeDefault applies the container runtime's default seccomp filter,
|
|
# which blocks the syscalls a normal workload never makes. It sits in the
|
|
# pod context on purpose: from here it covers every container in the pod
|
|
# including init containers, while a container-level seccompProfile would
|
|
# have to be repeated for each one (and silently missed on the next one
|
|
# added). A container that genuinely needs a different filter can still
|
|
# override it under securityContext.container, which wins over this value.
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
container:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
ports:
|
|
- containerPort: 8000
|
|
protocol: TCP
|
|
name: http
|
|
env:
|
|
# ingress.domain is not a pure Ingress value: Django's ALLOWED_HOSTS only
|
|
# accepts 127.0.0.1 and this DOMAIN, so an empty value makes the app answer
|
|
# 400 to every real request. It therefore stays required even when the
|
|
# Ingress is switched off via ingress.enabled.
|
|
- name: DOMAIN
|
|
value: '{{ required "A Domain/Host must be provided (ingress.domain)" .Values.ingress.domain }}'
|
|
- name: SECURE_COOKIES
|
|
value: "True"
|
|
- name: SESSION_COOKIE_AGE
|
|
value: "30"
|
|
- name: SESSION_EXPIRE_AT_BROWSER_CLOSE
|
|
value: "True"
|
|
- name: EXPIRY_THRESHOLD_DAYS
|
|
value: "90"
|
|
- name: EXPIRY_LAST_NOTIFICATION_DAYS
|
|
value: "7"
|
|
- name: TZ
|
|
value: "UTC"
|
|
- name: PORT
|
|
value: "8000"
|
|
- name: SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-secret"
|
|
key: "secretKey"
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-secret"
|
|
key: "redis-url"
|
|
- name: CELERY_WORKER_CONCURRENCY
|
|
value: "1"
|
|
- name: CELERY_WORKER_PREFETCH_MULTIPLIER
|
|
value: "1"
|
|
- name: OIDC_ENABLED
|
|
value: "True"
|
|
- name: OIDC_AUTOLOGIN
|
|
value: "True"
|
|
- name: OIDC_CREATE_USER
|
|
value: "True"
|
|
- name: OIDC_RP_SIGN_ALGO
|
|
value: "RS256"
|
|
- name: OIDC_OP_JWKS_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "oidc-jwks-endpoint"
|
|
- name: OIDC_RP_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "client-id"
|
|
- name: OIDC_RP_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "client-secret"
|
|
- name: OIDC_OP_AUTHORIZATION_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "authorization-endpoint"
|
|
- name: OIDC_OP_TOKEN_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "token-endpoint"
|
|
- name: OIDC_OP_USER_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "user-endpoint"
|
|
- name: DB_ENGINE
|
|
value: "postgres"
|
|
- name: POSTGRES_HOST
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "host"
|
|
- name: POSTGRES_PORT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "port"
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "user"
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "password"
|
|
- name: POSTGRES_DB
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "database"
|
|
storage:
|
|
volumes:
|
|
- name: voucher-vault-data
|
|
persistentVolumeClaim:
|
|
claimName: "{{ .Release.Name }}-{{ .Chart.Name }}-pvc"
|
|
volumeMounts:
|
|
- name: voucher-vault-data
|
|
mountPath: /opt/app/database
|
|
subPath: voucher-vault-data
|
|
|
|
storage:
|
|
amount: 10Gi
|
|
storageClass: null
|
|
|
|
ingress:
|
|
# Set to false to omit the Ingress entirely. Note that ingress.domain stays
|
|
# required even then: it is also Django's ALLOWED_HOSTS entry (the DOMAIN env
|
|
# above), not just the Ingress host. Only clusterIssuer becomes unnecessary.
|
|
enabled: true
|
|
clusterIssuer: null
|
|
domain: null
|
|
className: nginx
|
|
# Extra annotations for the Ingress; merged with the cert-manager
|
|
# cluster-issuer annotation the chart always sets.
|
|
annotations: {}
|