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: registry.edoc2.com:5000/edoc2v5/inbiz-frontend:inbiz-v6.5.2.9
          imagePullPolicy: IfNotPresent
          name: inbiz-frontend
          envFrom:
            - configMapRef:
                name: mid-envfile
            - configMapRef:
                name: inbiz-envfile
          ports:
            - name: frontend-http
              containerPort: 5007
          livenessProbe:
            httpGet:
              path: /
              port: frontend-http
            initialDelaySeconds: 10
            periodSeconds: 10
            timeoutSeconds: 3 # 检测时间间隔
            failureThreshold: 5 # 检测失败5次表示未就绪
            successThreshold: 1 # 检查成功为2次表示就绪
          securityContext:
            capabilities:
              add: ["SYS_PTRACE"]
      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
