ca2cd2c645
A self-contained demo kit: a TerdutServer against a throwaway, bare Postgres (bring-your-own DSN -- simplest path to stand up from nothing, ROADMAP.md Stage 1's own note), two TerdutTeams, and each team's own TerdutEscalationRule/TerdutDeadmanSwitch/TerdutAlertSource, so every CRD this operator manages is exercised together rather than in isolation the way config/samples' one-of-each already does. fire-alerts.sh sends terdut-server's own amPayload/amAlert shape (read from internal/api/alertmanager.go in that repo, not guessed from its docs) at whichever TerdutAlertSource's generated webhook Secret it reads the key out of -- high-cpu/disk-full/pod-crash scenarios to open and resolve incidents, and a heartbeat scenario matching each team's dead man's switch matcher, so stopping it demonstrates the switch noticing silence on its own. Verified server-side (kubectl apply --dry-run=server -k examples/demo) against this operator's own dev cluster, which already has these CRDs installed: every object validates. The one warning that cluster's "restricted" PodSecurity raises (postgres:17-alpine's entrypoint needs to start as root before it drops privileges itself) is noted inline in 00-postgres.yaml rather than worked around -- not a real production pattern, and this Postgres exists only to be thrown away with the rest of the demo namespace. README.md walks through: applying, watching status, why a few early CrashLoopBackOff restarts on terdut-demo itself are expected (this operator's Deployment template has no wait-for-postgres init container yet, unlike charts/terdut-server's chart as of v0.33.2), reaching the web UI (port-forward -- spec.networking.hostname is accepted but nothing creates an HTTPRoute for it yet), turning on open signup with the operator's own generated admin token since the bootstrap-created account has no password, firing alerts, and tearing down.
18 lines
709 B
YAML
18 lines
709 B
YAML
# Two teams (this one and 03-team-payments.yaml) so the demo shows
|
|
# per-team isolation -- separate incident lists, separate escalation
|
|
# ladders, separate alert sources -- rather than one team standing in for
|
|
# everything.
|
|
apiVersion: terdut.ryuvia.com/v1alpha1
|
|
kind: TerdutTeam
|
|
metadata:
|
|
name: terdutteam-platform
|
|
spec:
|
|
# serverRef.namespace omitted: both this and terdut-demo (01-server.yaml)
|
|
# live in whatever namespace you apply this directory into, which is the
|
|
# common case and needs no allowedTeams consent on the TerdutServer side
|
|
# (DESIGN.md §4.1, §4.6).
|
|
serverRef:
|
|
name: terdut-demo
|
|
displayName: Platform
|
|
# No oidc block: this demo is password-login only (01-server.yaml).
|