apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.3.0 (4f187a1)
  creationTimestamp: null
  labels:
    io.kompose.service: dspace
  name: dspace
  namespace: dspace
spec:
  replicas: 1
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        io.kompose.service: dspace
    spec:
      initContainers:
      - image: postgres
        name: clarin-dspace-check-db-ready
        command: ['sh', '-c',
          'until pg_isready -h postgres -p 5432;
          do echo waiting for database; sleep 2; done;']
      containers:
      - env:
        - name: DSPACE_USER
          valueFrom:
            secretKeyRef:
              key: dspace.user
              name: dspace-secrets
        - name: DSPACE_PASSWORD
          valueFrom:
            secretKeyRef:
              key: dspace.pass
              name: dspace-secrets
        - name: DSPACE_DBNAME
          valueFrom:
            secretKeyRef:
              key: dspace.db.name
              name: dspace-secrets
        - name: DSPACE_UTILSDBNAME
          valueFrom:
            secretKeyRef:
              key: dspace.utils.name
              name: dspace-secrets
        - name: MAIL_USER
          valueFrom:
            secretKeyRef:
              key: mail.user
              name: dspace-secrets
        - name: MAIL_PASSWORD
          valueFrom:
            secretKeyRef:
              key: mail.pass
              name: dspace-secrets
        image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/production/dspace:1.3.4
        name: clarin-dspace
        imagePullPolicy: Always
        ports:
        - containerPort: 8009
        - containerPort: 8080
        - containerPort: 8000
        - containerPort: 2641
        resources: {}
        volumeMounts:
        - mountPath: /opt/lindat-dspace/installation/assetstore
          name: dspace-assetstore
        livenessProbe:
          exec:
            command:
              - /bin/sh
              - -c
              - reply=$(curl -s -o /dev/null -w %{http_code} https://clarin.eurac.edu/repository/xmlui/); if [ "$reply" -lt 200 -o "$reply" -ge 400 ]; then exit 1; fi; ps aux | grep -v grep | grep -E "sleep|timeout" && exit 0 || exit 1;
          initialDelaySeconds: 900
          periodSeconds: 15
          timeoutSeconds: 3
      restartPolicy: Always
      imagePullSecrets:
        - name: gitlab-scientificnet-org-registry
      volumes:
        - cephfs:
            monitors:
            - 10.8.55.201:6789
            - 10.8.55.202:6789
            - 10.8.55.203:6789
            - 10.7.55.201:6789
            - 10.7.55.202:6789
            path: /eurac/commul/projects/clarin/kubernetes/dspace/assetstore
            secretRef:
              name: client.fs.commul.admin
            user: fs.commul.admin
          name: dspace-assetstore
status: {}
