Created complete Kubernetes deployment for Pangolin SSO gateway: - PVC: 10Gi encrypted storage for data persistence - Deployment: fosrl/pangolin:1.21.0 with OIDC configuration - Resources: 200m/512Mi requests, 1000m/2Gi limits - Recreate strategy for single-replica deployment - Health probes configured - Service: ClusterIP on port 3001 - Ingress: pangolin.basicstack.de with TLS via cert-manager - SealedSecret: Contains admin password and OIDC credentials - Client ID: 6cb8db32-410b-4df6-b2af-298af447b09a - Integrated with Pocket ID at auth.basicstack.de - Authorized group: pangolin-admins - Argo CD Application: Automated sync with CreateNamespace OIDC authentication configured for pangolin-admins group members: - andreas.leinen@basicstack.de - admin@basicstack.de Co-Authored-By: Paperclip <noreply@paperclip.ing>
143 lines
3.2 KiB
YAML
143 lines
3.2 KiB
YAML
---
|
|
# Pangolin Data PersistentVolumeClaim
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: pangolin-data
|
|
namespace: pangolin
|
|
annotations:
|
|
argocd.argoproj.io/sync-options: Delete=false
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: hcloud-volumes-encrypted
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
---
|
|
# Pangolin Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: pangolin
|
|
namespace: pangolin
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: pangolin
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pangolin
|
|
spec:
|
|
containers:
|
|
- name: pangolin
|
|
image: fosrl/pangolin:1.21.0
|
|
ports:
|
|
- containerPort: 3001
|
|
name: http
|
|
env:
|
|
- name: PANGOLIN_URL
|
|
value: "https://pangolin.basicstack.de"
|
|
- name: DATABASE_PATH
|
|
value: "/data/pangolin.db"
|
|
# OIDC Configuration
|
|
- name: OIDC_ENABLED
|
|
value: "true"
|
|
- name: OIDC_ISSUER
|
|
value: "https://auth.basicstack.de"
|
|
- name: OIDC_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: pangolin-secrets
|
|
key: oidc-client-id
|
|
- name: OIDC_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: pangolin-secrets
|
|
key: oidc-client-secret
|
|
- name: OIDC_CALLBACK_URL
|
|
value: "https://pangolin.basicstack.de/auth/callback"
|
|
- name: OIDC_SCOPES
|
|
value: "openid profile email groups"
|
|
# Admin Credentials
|
|
- name: ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: pangolin-secrets
|
|
key: admin-password
|
|
volumeMounts:
|
|
- name: pangolin-data
|
|
mountPath: /data
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "200m"
|
|
limits:
|
|
memory: "2Gi"
|
|
cpu: "1000m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3001
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3001
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
volumes:
|
|
- name: pangolin-data
|
|
persistentVolumeClaim:
|
|
claimName: pangolin-data
|
|
---
|
|
# Pangolin Service
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: pangolin
|
|
namespace: pangolin
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: pangolin
|
|
ports:
|
|
- port: 3001
|
|
targetPort: 3001
|
|
protocol: TCP
|
|
---
|
|
# Pangolin Ingress
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: pangolin
|
|
namespace: pangolin
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
spec:
|
|
ingressClassName: traefik
|
|
tls:
|
|
- hosts:
|
|
- pangolin.basicstack.de
|
|
secretName: pangolin-tls
|
|
rules:
|
|
- host: pangolin.basicstack.de
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: pangolin
|
|
port:
|
|
number: 3001
|