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