stack.basicstack.de/apps/pangolin/pangolin-controller-config.yaml
CTO Agent 672387e678 fix(pangolin): Reconnect controller to fresh Postgres Pangolin, route via internal API port 3001
DEV-452. After the SQLite -> Postgres migration in DEV-451 the pangolin
initial setup was redone, so the controller's stale bearer token was
invalid. That was only half the problem: /api/v1/traefik-config is
served exclusively by Pangolin's internal API (port 3001), not the
external dashboard API (port 3000). Pointing a Bearer request at port
3000 always returned 401 because that path lives on the session-auth
router. This has been the underlying cause of the controller's
CrashLoopBackOff, not just the stale key.

Changes:
- pangolin-controller-api-key-sealed.yaml: reseal new bearer token
  (kubeseal against sealed-secrets-controller in kube-system, includes
  the Bearer prefix expected by the controller).
- pangolin-controller-config.yaml: CONFIG_ENDPOINT now targets
  http://pangolin.pangolin.svc.cluster.local:3001/api/v1/traefik-config.
- pangolin-deployment.yaml: Service now exposes port 3001 as the
  "internal" port so in-cluster clients (kube-controller) can reach it.
  Ingress still only routes / and /api to ports 3002/3000; port 3001
  is not published to the internet.
- pangolin-controller-deployment.yaml: replicas back to 1, dropped the
  temporary "scaled to 0" comment block.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-08 11:35:02 +00:00

14 lines
582 B
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: pangolin-controller-config
namespace: pangolin
data:
# The Traefik dynamic config endpoint lives on Pangolin's internal API port (3001),
# not the external dashboard API (3000). The external port serves the session-authenticated
# dashboard router which returns 401 for Bearer requests to /api/v1/traefik-config.
CONFIG_ENDPOINT: "http://pangolin.pangolin.svc.cluster.local:3001/api/v1/traefik-config"
CONFIG_ALLOW_INSECURE_HTTP: "true"
TARGET_NAMESPACE: "pangolin"
ENABLE_LEADER_ELECTION: "true"
LOG_LEVEL: "info"