# License terms and conditions for Gluu Cloud Native Edition:
# https://www.apache.org/licenses/LICENSE-2.0
apiVersion: batch/v1
kind: Job
metadata:
  name: persistence-load-job
spec:
  template:
    spec:
      restartPolicy: Never
      containers:
        - name: persistence-load-job
          image: gluufederation/persistence:4.3.0_01
          envFrom:
          - configMapRef:
              name: gluu-config-cm
          volumeMounts:
            - name: cb-pass
              mountPath: "/etc/gluu/conf/couchbase_password"
              subPath: couchbase_password
            - name: cb-super-pass
              mountPath: "/etc/gluu/conf/couchbase_superuser_password"
              subPath: couchbase_superuser_password
            - name: cb-crt
              mountPath: "/etc/certs/couchbase.crt"
              subPath: couchbase.crt
      volumes:
      - name: cb-pass
        secret:
          secretName: cb-pass
      - name: cb-super-pass
        secret:
          secretName: cb-super-pass
      - name: cb-crt
        secret:
          secretName: cb-crt