---
apiVersion: v1
kind: Service
metadata:
  name: importsync
  namespace: edoc2
  labels:
    app: importsync
spec:
  ports:
  - name: importsync
    port: 8001
    targetPort: 8001
    protocol: TCP
  selector:
    app: importsync
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: importsync
  namespace: edoc2
  labels:
    app: importsync
    k8s-app: importsync
spec:
  replicas: 1
  selector:
    matchLabels:
      app: importsync
  template:
    metadata:
      labels:
        app: importsync
    spec:
      hostname: importsync
      terminationGracePeriodSeconds: 30
      containers:
      - name: importsync-container
        image: registry.edoc2.com:5000/edoc2v5/importsync:ecm-v6.5.3.1
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: mid-envfile
        - configMapRef:
            name: ecm-envfile
        ports:
        - name: importsync
          containerPort: 8081
        # 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
