apiVersion: apps/v1
kind: Deployment
metadata:
  name: sharestorage
  namespace: edoc2
  labels:
    app: sharestorage
    k8s-app: sharestorage
spec:
  selector:
    matchLabels:
      app: sharestorage
  replicas: 1
  revisionHistoryLimit: 5
  template:
    metadata:
      labels:
        app: sharestorage
    spec:
      hostname: sharestorage
      terminationGracePeriodSeconds: 30
      containers:
      - name: sharestorage
        image: registry.edoc2.com:5000/edoc2v5/sharestorage:docflow-v2.11.0
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: mid-envfile
        - configMapRef:
            name: ecm-envfile
        - configMapRef:
            name: docflow-envfile
        securityContext:
          privileged: true
        ports:
        - containerPort: 6700
          name: sharestorage
          protocol: TCP
        volumeMounts:
        - name: sharestorage
          mountPath: /sharestorage
        - name: edoc2docs
          mountPath: /edoc2Docs
        - name: data
          mountPath: /home/edoc2/macrowing/edoc2v5/data
      restartPolicy: Always
      volumes: 
      - name: sharestorage
        hostPath:
          path: /home/edoc2/macrowing/edoc2v5/data/DocflowSharestorage
      - name: edoc2docs
        hostPath:
          path: /home/edoc2/macrowing/edoc2v5/data
      - name: data
        hostPath:
          path: /home/edoc2/macrowing/edoc2v5/data
      nodeSelector:
        node.docflow.nodelabels: Docflow
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: sharestorage
  name: sharestorage
  namespace: edoc2
spec:
  ports:
  - name: sharestorage
    port: 6700
    targetPort: 6700
    protocol: TCP
  selector:
    app: sharestorage
  type: ClusterIP
