apiVersion: apps/v1
kind: Deployment
metadata:
  name: billing2
spec:
  selector:
    matchLabels:
      app: billing2
      service: billing
  replicas: 2
  template:
    metadata:
      labels:
        app: billing2
        service: billing
    spec:
      serviceAccountName: central
      containers:
        - name: billing2
          image: 380838443567.dkr.ecr.us-west-2.amazonaws.com/dbaas/prod/dbaas-billing2:20251114-1
          command: [ "/usr/local/bin/server" ]
          resources:
            requests:
              cpu: "1000m"
              memory: "800Mi"
            limits:
              cpu: "1000m"
              memory: "800Mi"
          env:
            - name: GCP_WORKLOAD_IDENTITY_AUDIENCE
              value: //iam.googleapis.com/projects/301623017899/locations/global/workloadIdentityPools/prod-dbaas/providers/prod-dbaas-eks-oidc
            - name: GCP_IMPERSONATE_SA
              value: prod-prod-central@dbaas-prod.iam.gserviceaccount.com
            - name: DBAAS-CENTRAL-AUTH0-CLIENT-AUDIENCE
              value: prod-management-portal-service
            - name: DBAAS-CENTRAL-AUTH0-DOMAIN
              value: tidb.auth0.com
            - name: CONTAINER_APP_NAME
              value: billing2
          envFrom:
            - secretRef:
                name: billing-secrets-v2

          volumeMounts:
            - name: dbaas-billing-config
              mountPath: "/etc/billing"
              readOnly: true
            - name: dbaas-billing-secrets
              mountPath: "/etc/billing_secrets"
              readOnly: true
      volumes:
        - name: dbaas-billing-config
          configMap:
            name: argo-dbaas-billing-config
        - name: dbaas-billing-secrets
          secret:
            secretName: billing-secrets-v2