apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: cve-manager
  name: cve-manager
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: cve-manager
  template:
    metadata:
      labels:
        app: cve-manager
    spec:
      imagePullSecrets:
      - name: huawei-swr-image-pull-secret
      containers:
        - env:
          - name: DB_USER
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: db-username
          - name: DB_PWD
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: db-passwd
          - name: DB_URI
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: db-uri
          - name: AES_KEY
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: aes-key
          - name: HOOK_PWD
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: hook-pwd
          - name: GITEE_TOKEN
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: gitee-token
          - name: EMAIL_NAME
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: cve-email-sendaddr
          - name: EMAIL_PWD
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: cve-email-password
          - name: GITEE_GAUSS_TOKEN
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: gitee_gauss_token
          - name: GITEE_MINDSPORE_TOKEN
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: gitee_mindspore_token
          - name: OBS_KEY_ID
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: obs-key-id
          - name: OBS_SECRET_KEY
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: obs-secret-key
          - name: GITEE_OPENLOOKENG_TOKEN
            valueFrom:
              secretKeyRef:
                name: cve-secrets
                key: gitee-openlookeng-token
          - name: TZ
            value: Asia/Shanghai
          image: swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/cve-manager-test:60366c79a320a0d3897372b27bd892d9f50f8a8c
          imagePullPolicy: IfNotPresent
          name: cve-manager
          ports:
          - containerPort: 8080
            name: http
            protocol: TCP
          resources:
            requests:
              cpu: 2000m
              memory: 2000Mi
            limits:
              cpu: 2000m
              memory: 2000Mi
          
