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