Niklas Ye ae97d28444
CI / chart (push) Successful in 1s
CI / security (push) Failing after 57s
CI / test (push) Successful in 2m0s
Add wait-for-postgres init container to the generated Deployment
This operator's own Deployment template crash-looped a few times against
a from-scratch postgres-operator cluster still doing initdb and Patroni
leader election -- exactly the gap examples/demo's own README just
documented for it. terdut-server's ping-retry budget on startup
(internal/db/db.go in that repo) is sized for a much shorter, different
race (NetworkPolicy propagation, a few seconds), not genuine first-time
cluster creation, so it exhausted and the process exited before ever
binding its HTTP port -- a startupProbe cannot fix that, since the crash
happens before there is anything to probe. Same root cause and same fix
as charts/terdut-server's own deployment.yaml template as of that repo's
v0.33.2.

waitForPostgresContainer reuses dbEnv unchanged: both of
resolveDatabaseEnv's two paths (DSN, postgresClusterRef) put
TERDUT_DB_DSN first, so it's already exactly what pg_isready needs, and
pg_isready needs no credentials, so dbEnv's optional PGPASSWORD riding
along too is harmless rather than load-bearing.

Covered by the existing envtest suite (asserts on Containers[0], the main
container, unaffected by adding InitContainers) -- `make test` passes
unchanged, 71.7% coverage on internal/controller. Updates examples/demo's
own README, which no longer needs to warn about this.
2026-10-02 10:11:55 +02:00
2026-10-01 14:13:19 +02:00
2026-10-01 14:13:19 +02:00
2026-09-30 19:22:09 +02:00
2026-09-30 19:22:09 +02:00

Terdut operator

Aims to expose most config as CRD's, so end users can self-service over gitops.

See DESIGN.md for the full design: CRD catalog and specs, reconciliation semantics, bootstrap/auth, Postgres integration, RBAC, and the relationship to charts/terdut-server. This README stays a short pitch; the open questions it used to carry are now resolved decisions there (§2).

CRD's

terdutServers

Creates a server — Deployment, Service, database wiring, bootstrap, operator credentials, and allowedTeams consent for cross-namespace teams. See DESIGN.md §4.1, §4.6.

terdutTeams

  • team name
  • oidc groups
  • serverRef — explicit reference to its TerdutServer, may be in a different namespace (one team owns the server, others self-service a team against it), gated by that TerdutServer's own allowedTeams field (DESIGN.md §2, §4.1, §4.2, §4.6)

terdutEscalationrules

  • rule
  • teamRef — explicit reference to its TerdutTeam (DESIGN.md §2, §4.3)

terdutDeadmansswitches

  • rule
  • teamRef (DESIGN.md §4.4)

terdutAlertSources

  • teamRef (DESIGN.md §4.5)
  • URL/key are generated by the server at creation and surfaced only via a generated Secret, never set explicitly

Demo

examples/demo wires one of every CRD above together — two teams, each with an escalation rule, a dead man's switch and an alert source — plus a script that fires synthetic Alertmanager webhooks at it, so you can watch real incidents open, escalate and resolve without a real Alertmanager anywhere in the picture.

S
Description
No description provided
Readme 989 KiB
Languages
Go 90.7%
Makefile 6.5%
Shell 1.4%
Go Template 0.8%
Dockerfile 0.6%