apiVersion: apps/v1
kind: Deployment
metadata:
  name: ombi
  labels:
    app.kubernetes.io/name: ombi
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: ombi
  template:
    metadata:
      labels:
        app.kubernetes.io/name: ombi
    spec:
      containers:
        - name: ombi
          image: ghcr.io/linuxserver/ombi:version-v4.0.1430
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              cpu: 50m
              memory: 100Mi
            limits:
              cpu: 200m
              memory: 500Mi
          ports:
            - name: ombi-port
              protocol: TCP
              containerPort: 3579
          volumeMounts:
            - name: ombi-config
              mountPath: /config
          livenessProbe:
            tcpSocket:
              port: ombi-port
            initialDelaySeconds: 30
            timeoutSeconds: 5
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 5
          readinessProbe:
            tcpSocket:
              port: ombi-port
            initialDelaySeconds: 30
            timeoutSeconds: 5
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 5
          env:
            - name: PUID
              value: "1000"
            - name: PGID
              value: "1000"
            - name: TZ
              value: ${CONFIG_TIMEZONE}
      securityContext:
        fsGroup: 1000
        fsGroupChangePolicy: "OnRootMismatch"
      volumes:
        - name: ombi-config
          persistentVolumeClaim:
            claimName: ombi-config
