apiVersion: apps/v1
kind: Deployment
metadata:
  name: homarr
  namespace: homarr
  labels:
    app: homarr
spec:
  replicas: 1
  selector:
    matchLabels:
      app: homarr
  template:
    metadata:
      labels:
        app: homarr
    spec:
      securityContext:
        fsGroup: 1000
      containers:
        - name: homarr
          image: ghcr.io/homarr-labs/homarr:latest
          imagePullPolicy: Always
          resources:
            requests:
              cpu: 100m
              memory: 512Mi
            limits:
              cpu: 1000m
              memory: 1Gi
          env:
            - name: AUTH_PROVIDERS
              value: "credentials,oidc"
            - name: AUTH_OIDC_ISSUER
              value: "https://authentik.henryathome.home64.de/application/o/homarr/"
            - name: AUTH_OIDC_CLIENT_ID
              value: "gLJekZnT5uwDXqWoTolP6YyktjdTAPmSAx7EVLcK"
            - name: AUTH_OIDC_CLIENT_SECRET
              value: "nX9qYyvtIH1PO3FFM13dvvKakv2eovyO9pFKNDYUKF0sycM8UFl0MgGkysqG5irpFsValNb2QkBLUKCRnCIcUt3M6ztCEe4po1Qqfvr0QZHRdH8d21vSHXMMdQmjQ2WN"
            - name: AUTH_OIDC_CLIENT_NAME
              value: "Authentik"
            - name: SECRET_ENCRYPTION_KEY
              valueFrom:
                secretKeyRef:
                  name: homarr-secret
                  key: SECRET_ENCRYPTION_KEY
          ports:
            - containerPort: 7575
              protocol: TCP
          volumeMounts:
            - name: homarr-data
              mountPath: /appdata
            - name: homarr-data
              mountPath: /app/data
      volumes:
        - name: homarr-data
          persistentVolumeClaim:
            claimName: homarr-pvc
