apiVersion: batch/v1
kind: Job
metadata:
  name: setup-ceph-file-layout
  namespace: ${namespace_processing}
spec:
  backoffLimit: 5
  template:
    spec:
      restartPolicy: "OnFailure"
      containers:
        - image: alpine
          command: ["/bin/sh"]
          args: ["-c", "apk update; apk add attr;cd /shared;setfattr -n ceph.dir.layout.stripe_unit -v 1048576 .;setfattr -n ceph.dir.layout.object_size -v 1048576 .;getfattr -n ceph.dir.layout .;echo 'Done.'"]
          name: alpine
          securityContext:
            privileged: true
          volumeMounts:
            - name: static-storage
              mountPath: /shared
      volumes:
        - name: static-storage
          persistentVolumeClaim:
            claimName: cephfs-static-pvc
