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>
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: pangolin-controller
|
|
namespace: pangolin
|
|
labels:
|
|
app: pangolin-controller
|
|
component: controller
|
|
spec:
|
|
replicas: 1
|
|
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
|