apiVersion: apps/v1
kind: Deployment
metadata:
  name: inbiz-frontend
  namespace: edoc2
  labels:
    app: inbiz-frontend
    k8s-app: inbiz-frontend
spec:
  replicas: 3
  selector:
    matchLabels:
      app: inbiz-frontend
  template:
    metadata:
      labels:
        app: inbiz-frontend
    spec:
      hostname: inbiz-frontend
      containers:
        - image: dev.registry.edoc2.com/edoc2v5/inbiz-frontend:20240619174717
          imagePullPolicy: IfNotPresent
          name: inbiz-frontend
          env:
            - name: CONTAINER_PLATFORM
              value: "kubernetes"
            - name: DEVCLOUDENABLE # 是否显示开发云
              value: "false"
            - name: INBIZ          # 启用inbiz相关转发
              value: "true"
            - name: INBIZ_ALL
              value: "false"
            - name: INBIZ_LOG
              value: "true"
            - name: WF             # 启用流程相关接口转发
              value: "true"
            - name: SEARCHENGINE   # 启用搜索相关转发
              value: "true"
            - name: OPENINBIZV5    # 启用inbiz v5相关接口转发
              value: "true"
            - name: AUTHCORE
              value: "true"
          ports:
            - name: frontend-http
              containerPort: 5007
          livenessProbe:
            httpGet:
              path: /health/
              port: frontend-http
            initialDelaySeconds: 10
            periodSeconds: 10
            timeoutSeconds: 3 # 检测时间间隔
            failureThreshold: 5 # 检测失败5次表示未就绪
            successThreshold: 1 # 检查成功为2次表示就绪
      restartPolicy: Always
      nodeSelector:
        node.drive.nodelabels: InDrive
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: inbiz-frontend
  name: inbiz-frontend
  namespace: edoc2
spec:
  ports:
    - name: frontend-http
      port: 5007
      protocol: TCP
      targetPort: 5007
  selector:
    app: inbiz-frontend
  type: ClusterIP
