apiVersion: apps/v1
kind: Deployment
metadata:
  name: login-frontend
  namespace: edoc2
  labels:
    app: login-frontend
    k8s-app: login-frontend
spec:
  replicas: 3
  selector:
    matchLabels:
      app: login-frontend
  template:
    metadata:
      labels:
        app: login-frontend
    spec:
      hostname: login-frontend
      containers:
        - image: registry.edoc2.com:5000/edoc2v5/login-frontend:inbiz-v6.7.0.0
          imagePullPolicy: IfNotPresent
          name: login-frontend
          envFrom:
            - configMapRef:
                name: mid-envfile
            - configMapRef:
                name: inbiz-envfile
          ports:
            - name: login-http
              containerPort: 6300
          livenessProbe:
            httpGet:
              path: /
              port: login-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: login-frontend
  name: login-frontend
  namespace: edoc2
spec:
  ports:
    - name: login-http
      port: 6300
      protocol: TCP
      targetPort: 6300
  selector:
    app: login-frontend
  type: ClusterIP
