---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: botinfo
  namespace: bot
  labels:
    app: botinfo
spec:
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: botinfo
  template:
    metadata:
      labels:
        app: botinfo
    spec:
      containers:
      - name: botpod
        image: swr.cn-north-4.myhuaweicloud.com/opensourceway/common/cibot:openlookeng
        imagePullPolicy: IfNotPresent
        env:
        - name: WEBSITE_URL
          value: 'https://openlookeng.io/'
        - name: CLA_REDIRECT_URL
          value: /signcla.html
        - name: GITEE_OAUTH2_SECRET
          valueFrom:
            secretKeyRef:
              name: bot
              key: gitee_auth_token
        - name: GITEE_OAUTH2_CLIENT_CODE
          valueFrom:
            secretKeyRef:
              name: bot
              key: gitee_auth_clientcode
        ports:
        - containerPort: 8888
          name: http
          protocol: TCP
        volumeMounts:
        - mountPath: /bot/
          name: configmap-volume
        args: ["--stderrthreshold=0"]
      volumes:
      - name: configmap-volume
        configMap:
          name: bot-configmap
