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