apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pnpm-store
  namespace: arc-ci
  labels:
    overdeck.dev/cache-kind: content-addressed
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: local-path
  resources:
    requests:
      storage: 20Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: runner-cache-volume-template
  namespace: arc-ci
data:
  # Merge this inert fragment into the ARC runner pod template. local-path is
  # RWO: use one scale set/store PVC per node when the fleet grows.
  pod-template.yaml: |
    spec:
      serviceAccountName: arc-runner
      automountServiceAccountToken: false
      securityContext:
        runAsNonRoot: true
        runAsUser: 1001
        runAsGroup: 1001
        fsGroup: 1001
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: runner
          env:
            - name: PNPM_STORE_DIR
              value: /cache/pnpm/store
            - name: VENV_ARCHIVE_DIR
              value: /cache/venv-archives
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
          volumeMounts:
            - name: content-cache
              mountPath: /cache
      volumes:
        - name: content-cache
          persistentVolumeClaim:
            claimName: pnpm-store
