---
apiVersion: v1
kind: Service
metadata:
  name: edoc2v8
  namespace: edoc2
  labels:
    app: edoc2v8
spec:
  ports:
  - name: edoc2v8
    port: 6360
    targetPort: 6360
    protocol: TCP
  selector:
    app: edoc2v8
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: edoc2v8
  namespace: edoc2
  labels:
    app: edoc2v8
    k8s-app: edoc2v8
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: edoc2v8
  template:
    metadata:
      labels:
        app: edoc2v8
    spec:
      hostname: edoc2v8
      #terminationGracePeriodSeconds: 60
      containers:
      - name: edoc2v8-container
        image: dev.registry.edoc2.com/edoc2v5/edoc2v8:20240620121627_5253f489fde4d8cd
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: mid-envfile
        - configMapRef:
            name: ecm-envfile
        env:
        - name: KUBE_API_ADDR
          value: $(KUBERNETES_SERVICE_HOST)
        - name: KUBE_API_PORT
          value: $(KUBERNETES_SERVICE_PORT)
        - name: ContainerContent
          value: "https://$(KUBERNETES_SERVICE_HOST):$(KUBERNETES_SERVICE_PORT)"
        - name: MODULE_VERSION
          value: 8.0.0.0
        securityContext:
          capabilities:
            add: ["SYS_PTRACE"]
        ports:
        - name: edoc2v8
          containerPort: 6360
        #resources:
          #requests:
            #cpu: 1900m
            #memory: 3.9Gi
          #limits:
            #cpu: 2000m
            #memory: 4Gi
        #volumeMounts:
        #  - mountPath: /edoc2Docs
        #    name: owner-edoc2v8-volume
      restartPolicy: Always
      #volumes:
      #  - name: owner-edoc2v8-volume
      #    hostPath:
      #      path: /home/data/edoc2Docs
      #      type: DirectoryOrCreate
      nodeSelector:
        node.drive.nodelabels: InDrive
