---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: act-runner-cache
  labels:
    app.kubernetes.io/name: act-runner-cache
spec:
  replicas: 2
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app.kubernetes.io/name: act-runner-cache
  template:
    metadata:
      labels:
        app.kubernetes.io/name: act-runner-cache
    spec:
      containers:
        - name: act-runner-cache
          image: act_runner
          command:
            - /bin/forgejo-runner
          args:
            - cache-server
            - --port=8080
            - --dir=/data
          resources:
            limits:
              memory: "384Mi"
              cpu: "250m"
          ports:
            - containerPort: 8080
          volumeMounts:
            - name: cache-data
              mountPath: /data
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
      volumes:
        - name: cache-data
          persistentVolumeClaim:
            claimName: act-runner-cache
      securityContext:
        runAsNonRoot: true
        fsGroup: 1001