Funk-lab/k8s/apps/authentik/deployment.yaml
ALI YESILKAYA 87b786eb57
feat(auth): annuaire Authentik + portail consoles Guacamole (#76)
- k8s/apps/authentik : IdP OIDC (auth.lab.local), namespace auth —
  server + worker 2026.5.3, Redis in-cluster, PG sur storage-01, PVC media
- k8s/apps/guacamole : portail consoles SSH web s01/g01 (portail.lab.local) —
  guacd + webapp 1.6.0, SSO OIDC vers Authentik, Job initdb idempotent
- ansible : rôle console_user (user sans sudo pour les consoles, s01 + g01),
  bases PG authentik/guacamole, secrets vault (mdp PG + clé SSH console)
- doc : admin/k8s/auth-portal.md (déploiement, config initiale, pièges)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 21:24:46 +02:00

135 lines
3.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: authentik-server
namespace: auth
spec:
replicas: 1
selector:
matchLabels:
app: authentik-server
template:
metadata:
labels:
app: authentik-server
spec:
containers:
- name: authentik
image: ghcr.io/goauthentik/server:2026.5.3
args: ["server"]
ports:
- containerPort: 9000
env:
- name: AUTHENTIK_SECRET_KEY
valueFrom:
secretKeyRef:
name: authentik-secret
key: secret-key
# PostgreSQL sur storage-01 (hors cluster) — même pattern que Ghostfolio/n8n
- name: AUTHENTIK_POSTGRESQL__HOST
value: "192.168.10.1"
- name: AUTHENTIK_POSTGRESQL__NAME
value: "authentik"
- name: AUTHENTIK_POSTGRESQL__USER
value: "authentik"
- name: AUTHENTIK_POSTGRESQL__PASSWORD
valueFrom:
secretKeyRef:
name: authentik-secret
key: pg-password
# Redis (in-cluster)
- name: AUTHENTIK_REDIS__HOST
value: "authentik-redis"
- name: AUTHENTIK_REDIS__PASSWORD
valueFrom:
secretKeyRef:
name: authentik-secret
key: redis-password
- name: TZ
value: "Europe/Paris"
volumeMounts:
- name: media
mountPath: /media
resources:
requests:
cpu: 200m
memory: 700Mi
limits:
cpu: 1000m
memory: 1536Mi
readinessProbe:
httpGet:
path: /-/health/ready/
port: 9000
initialDelaySeconds: 30
periodSeconds: 15
livenessProbe:
httpGet:
path: /-/health/live/
port: 9000
initialDelaySeconds: 60
periodSeconds: 30
volumes:
- name: media
persistentVolumeClaim:
claimName: authentik-media
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: authentik-worker
namespace: auth
spec:
replicas: 1
selector:
matchLabels:
app: authentik-worker
template:
metadata:
labels:
app: authentik-worker
spec:
containers:
- name: authentik
image: ghcr.io/goauthentik/server:2026.5.3
args: ["worker"]
env:
- name: AUTHENTIK_SECRET_KEY
valueFrom:
secretKeyRef:
name: authentik-secret
key: secret-key
- name: AUTHENTIK_POSTGRESQL__HOST
value: "192.168.10.1"
- name: AUTHENTIK_POSTGRESQL__NAME
value: "authentik"
- name: AUTHENTIK_POSTGRESQL__USER
value: "authentik"
- name: AUTHENTIK_POSTGRESQL__PASSWORD
valueFrom:
secretKeyRef:
name: authentik-secret
key: pg-password
- name: AUTHENTIK_REDIS__HOST
value: "authentik-redis"
- name: AUTHENTIK_REDIS__PASSWORD
valueFrom:
secretKeyRef:
name: authentik-secret
key: redis-password
- name: TZ
value: "Europe/Paris"
volumeMounts:
- name: media
mountPath: /media
resources:
requests:
cpu: 100m
memory: 500Mi
limits:
cpu: 500m
memory: 1Gi
volumes:
- name: media
persistentVolumeClaim:
claimName: authentik-media