apps(pocketid): Added Pocket-ID to deployment

This commit is contained in:
2025-05-31 22:47:45 +02:00
parent 2956566bc6
commit 217bc2da52
5 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: pocketid-config
data:
APP_URL: "https://auth.remilia.ch"
TRUST_PROXY: "true"

View File

@@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pocketid
labels:
app.kubernetes.io/name: pocketid
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: pocketid
template:
metadata:
labels:
app.kubernetes.io/name: pocketid
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: location
operator: In
values:
- fsn
volumes:
- name: pocketid-data
persistentVolumeClaim:
claimName: pocketid-data-pvc
containers:
- name: pocketid
image: ghcr.io/pocket-id/pocket-id:latest
imagePullPolicy: Always
ports:
- containerPort: 1411
envFrom:
- configMapRef:
name: pocketid-config
volumeMounts:
- name: pocketid-data
mountPath: "/app/data"
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

View File

@@ -0,0 +1,5 @@
resources:
- configmap.yaml
- deployment.yaml
- pvc.yaml
- services.yaml

11
apps/pocketid/pvc.yaml Normal file
View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pocketid-data-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 2Gi

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: pocketid
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: pocketid
ports:
- protocol: TCP
port: 80
targetPort: 1411
name: http