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