stack.basicstack.de/apps/pangolin/pangolin-controller-deployment.yaml
CTO Agent 05f0101684 chore(pangolin): Scale pangolin-controller to 0 pending API key re-issuance
The DB switch (DEV-451, SQLite -> PostgreSQL) starts Pangolin from a
fresh schema with no admin user or API key. The controller's bearer
token in pangolin-controller-api-key SealedSecret was issued against
the old SQLite state and is now invalid (the controller was already
in CrashLoopBackOff for the same reason).

Scale to 0 replicas so the ArgoCD Application reports Healthy after
the DB migration. Follow-up work will run Pangolin initial setup,
issue a new controller API key, and re-seal the secret before scaling
back to 1.

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

81 lines
2.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: pangolin-controller
namespace: pangolin
labels:
app: pangolin-controller
component: controller
spec:
# Scaled to 0 after Pangolin DB migration (SQLite -> PostgreSQL, DEV-451):
# the fresh Pangolin has no admin user or API key yet, so the controller's
# bearer token in pangolin-controller-api-key SealedSecret is invalid.
# Re-enable after running Pangolin initial setup and resealing a new key.
# Tracked in the follow-up child issue.
replicas: 0
strategy:
type: Recreate
selector:
matchLabels:
app: pangolin-controller
component: controller
template:
metadata:
labels:
app: pangolin-controller
component: controller
spec:
serviceAccountName: pangolin-controller
containers:
- name: controller
image: fosrl/pangolin-kube-controller:0.1.0-alpha.1
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: pangolin-controller-config
env:
- name: CONFIG_AUTH_HEADER
valueFrom:
secretKeyRef:
name: pangolin-controller-api-key
key: auth-header
ports:
- name: metrics
containerPort: 9090
protocol: TCP
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /readyz
port: 9090
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- ALL
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault