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
153 lines
6.7 KiB
YAML
153 lines
6.7 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
|
|
|
|
# Routing table of the router: which client-facing hostname is proxied to which
|
|
# backend Minecraft server. Required and must not be empty - a router without
|
|
# routes is not operable, and there is no sensible default.
|
|
# Every entry needs "domain" and "internalUrl"; the optional "port" overrides
|
|
# server.backendPort for that single backend:
|
|
# mappings:
|
|
# - domain: mc.example.com
|
|
# internalUrl: survival-service.minecraft.svc.cluster.local
|
|
# - domain: creative.example.com
|
|
# internalUrl: creative-service.minecraft.svc.cluster.local
|
|
# port: 25566
|
|
# Since chart 2.0.0 a change here rolls the router pod: the deployment carries
|
|
# a checksum/config annotation over the rendered ConfigMap. That restart is
|
|
# required for the change to take effect at all - the config is mounted with
|
|
# subPath and mc-router only reads it at startup - and costs a few seconds of
|
|
# proxy downtime, during which clients cannot connect.
|
|
mappings: null
|
|
|
|
server:
|
|
# Replica count for this workload; 0 is allowed and scales it down.
|
|
# The chart-global scaleDown flag takes precedence.
|
|
replicas: 1
|
|
# nodePort of the router Service. 25565 is the Minecraft default port and is
|
|
# deliberately outside the Kubernetes default node-port range (30000-32767) -
|
|
# the cluster runs an extended --service-node-port-range. Do NOT "fix" this
|
|
# into the default range: the Minecraft clients connect to this exact port.
|
|
outwardPort: 25565
|
|
# Port the router listens on for Minecraft client connections (mc-router
|
|
# --port); used as containerPort and as the Service's cluster-internal port.
|
|
port: 25565
|
|
# Default port of the backend Minecraft servers, used for every mapping that
|
|
# does not carry its own "port".
|
|
backendPort: 25565
|
|
# Port of the mc-router HTTP API (--api-binding). Not exposed by the Service;
|
|
# only the probes talk to it.
|
|
apiPort: 8080
|
|
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: 100m
|
|
memory: 50Mi
|
|
ephemeral-storage: 50Mi
|
|
# The probes query the mc-router API. Even in 1.46.4 there is still no
|
|
# /health or /healthz endpoint - the API server serves GET/POST /routes,
|
|
# POST /defaultRoute, DELETE /routes/{addr}, /vars and /metrics and nothing
|
|
# else - so GET /routes stays the health signal. It answers with the live
|
|
# routing table, and the API server is only started after the routes config
|
|
# has been read and the Minecraft listener is up, so a 200 here means the
|
|
# router is actually serving clients.
|
|
# The "Accept: application/json" header was mandatory in 1.25.1 (the API
|
|
# router matched on it and answered 404 without it); mc-router 1.32.2 dropped
|
|
# that matcher, so from there on the header is optional. It is kept because
|
|
# it is the correct request for a JSON endpoint and the response is identical
|
|
# with and without it - removing it would be churn without any gain.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /routes
|
|
port: api-port
|
|
httpHeaders:
|
|
- name: Accept
|
|
value: application/json
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /routes
|
|
port: api-port
|
|
httpHeaders:
|
|
- name: Accept
|
|
value: application/json
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
# The startup probe gates liveness/readiness. mc-router is a single static Go
|
|
# binary that reads one config file and serves the API in well under a
|
|
# second; budget = periodSeconds * failureThreshold = 30s.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /routes
|
|
port: api-port
|
|
httpHeaders:
|
|
- name: Accept
|
|
value: application/json
|
|
periodSeconds: 2
|
|
timeoutSeconds: 5
|
|
failureThreshold: 15
|
|
securityContext:
|
|
pod:
|
|
runAsNonRoot: true
|
|
# Up to 1.45.x the itzg/mc-router image was built FROM scratch and
|
|
# declared no user, so it would have run as root. Since 1.46.0 it is
|
|
# based on cgr.dev/chainguard/static and declares USER 65532. The chart
|
|
# keeps pinning its own unprivileged uid/gid regardless, so the runtime
|
|
# identity does not silently change with the base image; the statically
|
|
# linked binary needs no particular uid/gid.
|
|
runAsUser: 10000
|
|
runAsGroup: 10000
|
|
# Keeps the mounted routing-config ConfigMap readable for that gid.
|
|
fsGroup: 10000
|
|
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
|
|
# No deviation needed: the image ships nothing but the static binary and
|
|
# a CA bundle, mc-router writes nothing, and the only mount is the
|
|
# read-only routing config.
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
add: []
|
|
# Extra environment variables for the router container, appended to the ones
|
|
# the chart always sets (ROUTES_CONFIG). This is also how every mc-router
|
|
# option that the chart does not model explicitly is set: mc-router parses
|
|
# its flags with go-flagsfiller, so every "--some-flag" is equally settable
|
|
# as "SOME_FLAG" (that is exactly how ROUTES_CONFIG maps to --routes-config).
|
|
# Useful examples in 1.46.4: LOG_LEVEL (debug/info/warn/error),
|
|
# BACKEND_DIAL_TIMEOUT, CONNECTION_RATE_LIMIT.
|
|
# Values are rendered through tpl and support the value, secretKeyRef and
|
|
# configMapKeyRef forms:
|
|
# - name: SOME_ENV
|
|
# value: "{{ .Release.Name }}"
|
|
# - name: FROM_SECRET
|
|
# valueFrom:
|
|
# secretKeyRef:
|
|
# name: "some-secret"
|
|
# key: "someKey"
|
|
# - name: FROM_CONFIGMAP
|
|
# valueFrom:
|
|
# configMapKeyRef:
|
|
# name: "some-configmap"
|
|
# key: "someKey"
|
|
env: []
|