---
apiVersion: v1
kind: Service
metadata:
  name: previewedit
  namespace: edoc2
  labels:
    app: previewedit
spec:
  ports:
  - name: preview-6370
    port: 6370
    targetPort: 6370
    protocol: TCP
  - name: previewgrpc
    port: 16370
    targetPort: 16370
    protocol: TCP
  selector:
    app: previewedit
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment 
metadata:
  name: previewedit
  namespace: edoc2
  labels:
    app: previewedit
    k8s-app: previewedit
spec:
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: previewedit
  template:
    metadata:
      labels:
        app: previewedit
    spec:
      hostname: previewedit
      terminationGracePeriodSeconds: 60
      containers:
      - name: previewedit-container
        image: dev.registry.edoc2.com/edoc2v5/previewedit:20240612114203_3b54be338583b3e4
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: mid-envfile
        - configMapRef:
            name: ecm-envfile
        ports:
        - name: preview-6370
          containerPort: 6370
        - name: previewgrpc
          containerPort: 16370
        resources:
          requests:
            cpu: 800m
            memory: 1.5Gi
          limits:
            cpu: 900m
            memory: 1.6Gi
        securityContext:
          capabilities:
            add: ["SYS_PTRACE"]
        #volumeMounts:
        #  - mountPath: /edoc2Docs
        #    name: previewedit-app-volume
      restartPolicy: Always
      #volumes:
      #  - name: previewedit-app-volume
      #    hostPath:
      #      path: /home/data/edoc2Docs
      #      type: DirectoryOrCreate
      nodeSelector:
        node.drive.nodelabels: InDrive
