apiVersion: apps/v1
kind: Deployment
metadata:
  name: billing2-worker
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: billing2-worker
  template:
    metadata:
      labels:
        app.kubernetes.io/name: billing2-worker
    spec:
      containers:
        - name: billing2-worker
          image: cp9.local/billing2-worker:placeholder
          ports:
            - name: http
              containerPort: 18888
          env:
            - name: CONTAINER_APP_NAME
              value: billing2-worker
            - name: AWS_WEB_IDENTITY_TOKEN_FILE
              value: /var/run/secrets/cp9-local-web-identity/token
            - name: AWS_ROLE_ARN
              value: arn:aws:iam::000000000000:role/cp9-local-disabled
            - name: AWS_ROLE_SESSION_NAME
              value: cp9-local
            - name: GCP_WORKLOAD_IDENTITY_AUDIENCE
              value: cp9-local-disabled
            - name: GCP_IMPERSONATE_SA
              value: cp9-local-disabled
          volumeMounts:
            - name: dbaas-billing-config
              mountPath: /etc/billing
              readOnly: true
            - name: dbaas-billing-secrets
              mountPath: /etc/billing_secrets
              readOnly: true
            - name: cp9-local-web-identity
              mountPath: /var/run/secrets/cp9-local-web-identity
              readOnly: true
      volumes:
        - name: dbaas-billing-config
          configMap:
            name: argo-dbaas-billing-config
        - name: dbaas-billing-secrets
          configMap:
            name: billing-local-empty-secrets
        - name: cp9-local-web-identity
          configMap:
            name: cp9-local-web-identity
