apiVersion: apps/v1
kind: Deployment
metadata:
  name: wf
  namespace: edoc2
  labels:
    app: wf
    k8s-app: wf
spec:
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: wf
  template:
    metadata:
      labels:
        app: wf
    spec:
      hostname: wf
      terminationGracePeriodSeconds: 60
      containers:
        - name: wf
          image: registry.edoc2.com:5000/edoc2v5/wf:inbiz-v6.5.3.1
          imagePullPolicy: IfNotPresent
          envFrom:
            - configMapRef:
                name: mid-envfile
            - configMapRef:
                name: inbiz-envfile
          ports:
            - name: wf-http
              containerPort: 8080
          securityContext:
            capabilities:
              add: ["SYS_PTRACE"]
          livenessProbe:
            httpGet:
              path: /edoc2Flow-web/
              port: wf-http
            initialDelaySeconds: 300
            periodSeconds: 10
            timeoutSeconds: 3 # 检测时间间隔
            failureThreshold: 5 # 检测失败5次表示未就绪
            successThreshold: 1 # 检查成功为2次表示就绪
      restartPolicy: Always
      nodeSelector:
        node.drive.nodelabels: InDrive
---
apiVersion: v1
kind: Service
metadata:
  name: wf
  namespace: edoc2
  labels:
    app: wf
spec:
  ports:
    - name: wf-http
      port: 8080
      targetPort: 8080
      protocol: TCP
  selector:
    app: wf
  type: ClusterIP
