apiVersion: v1
kind: Namespace
metadata:
  name: matrix
---
apiVersion: batch/v1
kind: Job
metadata:
  name: synapse-generate
  namespace: matrix
spec:
  ttlSecondsAfterFinished: 100
  template:
    spec:
      containers:
        - image: docker.io/matrixdotorg/synapse:latest
          name: synapse
          command: ["generate"]
          volumeMounts:
            - mountPath: /data
              name: synapse-data
          volumes:
            - name: synapse-data
              persistentVolumeClaim:
                claimName: synapse-data
                # template:
                #   spec:
                #     containers:
                #       - image: docker.io/matrixdotorg/synapse:latest
                #         name: synapse
                #         command: ["generate"]
                #         volumeMounts:
                #           - mountPath: /data
                #             name: synapse-data
                #         volumes:
                #           - name: synapse-data
                #             persistentVolumeClaim:
                #               claimName: synapse-data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  labels:
    io.kompose.service: synapse-data
  name: synapse-data
  namespace: matrix
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Mi
status: {}
