---
apiVersion: v1
kind: Service
metadata:
  name: sharestorage
  namespace: edoc2
  labels:
    app: sharestorage
spec:
  ports:
  - name: sharestorage-6700
    port: 6700
    targetPort: 6700
    protocol: TCP
  selector:
    app: sharestorage
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment 
metadata:
  name: sharestorage
  namespace: edoc2
  labels:
    app: sharestorage
    k8s-app: sharestorage
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: sharestorage
  template:
    metadata:
      labels:
        app: sharestorage
    spec:
      hostname: sharestorage
      terminationGracePeriodSeconds: 60
      containers:
      - name: sharestorage-container
        image: registry.edoc2.com:5000/edoc2v5/sharestorage:ecm-v6.5.2.2
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: mid-envfile
        - configMapRef:
            name: ecm-envfile
        ports:
        - name: sharestorage-6700
          containerPort: 6700
        resources:
          requests:
            cpu: 800m
            memory: 1.5Gi
          limits:
            cpu: 900m
            memory: 1.6Gi
        securityContext:
          capabilities:
            add: ["SYS_PTRACE"]
      restartPolicy: Always
      nodeSelector:
        node.drive.nodelabels: InDrive
