apiVersion: apps/v1
kind: Deployment
metadata:
  name: triage-party
  namespace: triageparty-release
  labels:
    app: triage-party
spec:
  selector:
    matchLabels:
      app: triage-party
  template:
    metadata:
      labels:
        app: triage-party
    spec:
      containers:
        - name: triage-party
          image: triageparty/triage-party:1.3.0
          env:
            - name: GITHUB_TOKEN
              valueFrom:
                secretKeyRef:
                  name: triage-party-github-token
                  key: token
            - name: PERSIST_BACKEND
              value: "disk"
            - name: PERSIST_PATH
              value: "/app/triage-party/cache"
          ports:
            - containerPort: 8080
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /health
              port: 8080
              scheme: HTTP
            timeoutSeconds: 5
          resources:
            limits:
              cpu: 1
              memory: 4Gi
          volumeMounts:
            - name: config
              mountPath: /app/config
            - name: pcache
              mountPath: /app/triage-party
      volumes:
        - name: config
          configMap:
            name: triage-party-config-release
        - name: pcache
          persistentVolumeClaim:
            claimName: triage-party-persistence
