apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    sidecar.jaegertracing.io/inject: jaeger
  name: account-central
spec:
  progressDeadlineSeconds: 600
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: account-central
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: account-central
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchLabels:
                app: account-central
            topologyKey: kubernetes.io/hostname
      topologySpreadConstraints:
      - maxSkew: 1
        topologyKey: topology.kubernetes.io/zone
        whenUnsatisfiable: ScheduleAnyway
        labelSelector:
          matchLabels:
            app: account-central
      containers:
      - command:
        - account-central
        env:
        - name: TIINF_POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: CENTRAL_ROLE
          value: API_SERVICE
        - name: GCP_WORKLOAD_IDENTITY_AUDIENCE
          value: //iam.googleapis.com/projects/27323915999/locations/global/workloadIdentityPools/dev-dbaas/providers/dev-dbaas-eks-oidc
        - name: GCP_IMPERSONATE_SA
          value: dev-nightly-central@pingcap-gardener.iam.gserviceaccount.com
        - name: AWS_DEFAULT_REGION
          value: us-west-2
        - name: AWS_REGION
          value: us-west-2
        - name: ENABLE_TRACING
          value: "true"
        - name: LS_ACCESS_TOKEN
          value: u243B4DJCewXd9mCiNpsokLRo+x25x5T9Hb12+24YjVS9oavfkJtmp7o9jQjnYbCGFwS1ucNcD1tJrS6Lu12Vd2LqMa0EKEKLgAO/fOv
        - name: SQS_QUEUE_URL
          value: https://sqs.us-west-2.amazonaws.com/385595570414/account-dev
        image: 385595570414.dkr.ecr.us-west-2.amazonaws.com/dbaas/dev/account:0d50cc208ecfcc226eddb3b188d75987580f3e98
        imagePullPolicy: IfNotPresent
        name: account-central
        readinessProbe:
          failureThreshold: 10
          httpGet:
            path: /healthz
            port: 11000
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 5
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: 250m
            memory: 256Mi
          requests:
            cpu: 125m
            memory: 256Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/dbaas
          name: dbaas-central-config
          readOnly: true
        - mountPath: /var/log/central
          name: dbaas-central-auditlog
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: central
      serviceAccountName: central
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          name: argo-account-central-conf
        name: dbaas-central-config
      - emptyDir: {}
        name: dbaas-central-auditlog


---

apiVersion: v1
kind: Service
metadata:
  name: account-central-http-v2
spec:
  selector:
    app: account-central
  ports:
    - name: http
      protocol: TCP
      port: 11000
      targetPort: 11000
  externalTrafficPolicy: Local
  type: NodePort
