tws-k8s

The GitOps repository for TWS's Kubernetes cluster: the Talos machine-config patches, the platform (Argo CD, Longhorn, CloudNativePG, the Tailscale operator, Kargo) and the apps we maintain ourselves, TicketingSystem first. Design and sequencing: Goddard's manual, docs/kubernetes.md; roadmap: josh/TicketingSystem milestone 4 · Kubernetes; lifecycle ticket josh/TheWrightServer#1473.

Skeleton (2026-11-06). Nothing here has been applied yet. Each part is exercised, and corrected, at its roadmap step: talos/ at #60, platform/ at #61, apps/ and kargo/ at #62.

Layout

Path What Applied by
talos/ Machine-config patches and the cluster's pinned versions. No secrets: the secrets bundle, talosconfig and kubeconfig live on the Semaphore host TWS-Semaphore talos.yml (talosctl gen config with these patches, apply-config, bootstrap)
platform/argocd/ Argo CD itself (upstream install manifest, pinned) talos.yml, once (kubectl apply -k)
platform/root-app.yaml The app-of-apps: Argo CD syncs platform/apps/ from main talos.yml, once
platform/apps/ One Argo Application per platform component and per TicketingSystem stage Argo CD
apps/ticketing/ TicketingSystem: base/ and one overlay per stage (dev, staging, later prod). The image tags in the overlays are written by Kargo Argo CD
hack/ preflight.sh and its CRD schema check You, before a pull request
kargo/<app>/ One Kargo project per app (kargo/tws-mcp/ is josh/tws-mcp's, with apps/tws-mcp/; kargo/quartermaster/ is josh/Quartermaster's, with apps/quartermaster/; kargo/dowser/ is josh/Dowser's, with apps/dowser/; kargo/vector/ is josh/Vector's, with apps/vector/). kargo/ticketing/, the ticketing project: the Warehouse watching Gitea's registry, the Stages dev → staging → prod, the verification Argo CD (platform/apps/kargo-ticketing.yaml)

Rules

  • Run hack/preflight.sh before every pull request (kubectl, helm, python3 + PyYAML): it builds every kustomization, renders every Helm Application with its values, checks that privileged workloads only land in namespaces labelled privileged (Talos enforces the baseline Pod Security level) and validates every custom resource here against the CRDs the charts install. Talos patches are checked separately (talos/README.md).

  • No secrets in Git. Kubernetes Secrets the apps need (the server's JWT_SECRET, the importer's Gitea token, the Tailscale operator's OAuth client, Kargo's Git token, the registry pull token if ever needed) are applied by talos.yml from the Semaphore host: the ones Goddard owns (Kargo's admin login, the stages' JWT_SECRETs) it generates, the three only josh can mint come from /etc/tws-k8s/secrets/. Shapes in docs/secrets.md. Argo CD doesn't manage them.

  • main is what runs. Argo CD syncs main; Kargo commits stage promotions to main. Platform and app changes go through pull requests that josh merges; the only direct commits are Kargo's promotions.

  • Pinned versions (2026-11-06): Talos 1.14.4 · Argo CD 3.6.1 · local-path-provisioner v0.0.37 (Longhorn 1.13.0 returns with three nodes) · CloudNativePG 1.30.1 · Kargo 1.12.5 · Argo Rollouts 2.43.11 (app 1.10.2) · Tailscale operator 1.104.4. Bump through pull requests.

  • Public names. The cluster is on the LAN, not the tailnet; it reaches Gitea and the registry through gitea.thewrightserver.net. The Tailscale operator's proxies (tag:k8s) put each stage on the tailnet (ticketing-dev, ticketing-staging, ticketing-prod; ticketing is still CT 174), and at cutover Andromeda points the public name at ticketing-prod.

S
Description
No description provided
Readme
927 KiB
0 Stars 1 Watchers 0 Forks
Languages
Shell 83.1%
Python 16.9%