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