Kustomize Overlays: prediction-assistant
Kustomize Overlays: kalshi-assistant
Directory structure and overlay strategy for kalshi-assistant manifests in pal-e-deployments. Follows the pattern established by landscaping-assistant. Two overlays: prod (full cluster deployment) and dev (nginx proxy to developer workstation).
Diagram
Components
| Component | Purpose | Notes |
|---|---|---|
| base/deployment.yaml | Core deployment spec shared by all overlays | Container image, ports, resource limits, health probes |
| base/service.yaml | ClusterIP service exposing the app port | Referenced by ingress (prod) and nginx proxy (dev) |
| base/configmap.yaml | Shared configuration values | Environment-specific values patched by overlays |
| overlays/prod/namespace.yaml | Namespace resource for prod | Created by IaC but declared here for completeness |
| overlays/prod/ingress.yaml | Ingress resource for Tailscale funnel routing | Routes external traffic to the service |
| overlays/prod/servicemonitor.yaml | Prometheus ServiceMonitor for metrics scraping | Targets the /metrics endpoint; see arch-observability |
| overlays/prod/rename-patches.yaml | Strategic merge patches for prod naming | Adds namespace prefix, labels, annotations for prod context |
| overlays/dev/nginx-proxy-conf | Nginx config that proxies to dev machine IP | Enables cluster-hosted dev URL pointing to localhost dev server |
| overlays/dev/deployment-override.yaml | Replaces app container with nginx | Nginx image serves as reverse proxy to dev workstation |
| overlays/dev/configmap.yaml | Dev machine IP and port | Updated when developer's Tailscale IP changes |
Key Decisions
- Landscaping-assistant as reference pattern: kalshi-assistant follows the exact directory structure and overlay strategy proven by landscaping-assistant. Consistency across services reduces cognitive load.
- Dev overlay uses nginx proxy, not port-forward: Instead of running the app in-cluster during development, the dev overlay deploys an nginx reverse proxy that forwards traffic to the developer's local machine. This gives a real cluster URL while the developer iterates locally.
- Prod overlay includes ServiceMonitor: Observability is wired in at the deployment level, not bolted on later. Every prod deployment includes its ServiceMonitor for Prometheus scraping.
- Rename patches for namespace scoping: Strategic merge patches handle namespace-specific naming so the base manifests remain environment-agnostic.
- No Helm: Plain Kustomize overlays with YAML patches. The complexity budget is spent on getting the overlay structure right, not on a templating engine.