TerdutServer: trim spec.pod passthroughs, harden the Zalando DSN, make the init image configurable #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Items on the
TerdutServerDeployment builder (internal/controller/terdutserver_*.go) left from the Oct 2026 review:wait-for-postgresinit container hard-codespostgres:17-alpine(the chart makes it configurable). The server's owndb.Opennow retries the ping, so decide whether the init container is still needed; if it stays, make the image a field.runAsNonRoot,runAsUser: 65532,readOnlyRootFilesystem,drop ALL); onlyspec.podpassthroughs apply. Give it the same safe defaults.PUBLIC_URLis alwayshttps://<hostname>; the chart allowsnotify.publicUrl. Add the override if needed.terdutserver_database.go): role and database are hard-coded toterdut, port 5432 andsslmode=require, rather than derived from thepostgresqlCR;classifyClusterGetErrormaps real errors (RBAC) toPostgresClusterNotFound; no Secret watch, so a rotated password waits for the 5-minute resync. Either derive properly (CNPG-styleconnectionSecretRef) or droppostgresClusterRefand requiredsnplus a Secret reference.replicas,servicePortdefaults are repeated in the Go builder and the CRD defaults; keep only the CRD ones.spec.podknobs: prune any nobody sets.spec.sweeperandspec.notifyhave no pattern validation; the server silently falls back to defaults on a typo (config.duration).terdutServerblock duplicates the CRD spec and is overwritten bykubebuilder edit ... --force(see CLAUDE.md). Hand-maintain the chart or generate the block.config.go, the server chart,buildEnvand the CRD: add a test that every env varbuildEnvsets is read byconfig.go.