---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: botinfo
  namespace: bot
  labels:
    app: botinfo
  annotations:
    flux.weave.works/automated: "true"
    flux.weave.works/tag.botinfod: semver:~1.0
spec:
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: botinfo
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        app: botinfo
    spec:
      containers:
      - name: botinfod
        image: swr.ap-southeast-1.myhuaweicloud.com/opengauss/cibot:v1.0.2021022600
        imagePullPolicy: IfNotPresent
        args:
        - --stderrthreshold=0
        env:
        - name: GITEE_OAUTH2_SECRET
          valueFrom:
            configMapKeyRef:
              key: gitee_oauth2_secret
              name: bot-configmap
        - name: GITEE_OAUTH2_CLIENT_CODE
          valueFrom:
            configMapKeyRef:
              key: gitee_oauth2_client_code
              name: bot-configmap
        - name: WEBSITE_URL
          value: https://opengauss.org/
        ports:
        - containerPort: 8888
          name: http
          protocol: TCP
        volumeMounts:
        - mountPath: /bot/
          name: configmap-volume
      volumes:
      - name: configmap-volume
        configMap:
          name: bot-configmap
