apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/instance: nightly-core-svc-chenfei
    sidecar.jaegertracing.io/injected: jaeger
  name: dbaas-core-svc-worker-chenfei
  namespace: nightly-ms
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dbaas-core-svc-worker-chenfei
  template:
    metadata:
      labels:
        app: dbaas-core-svc-worker-chenfei
    spec:
      containers:
        - command:
            - /core-svc
            - serve
            - --config-path=/etc/core-svc/core-svc-config.yaml
          env:
            - 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: TIINF_POD_NAME
              value: coresvc-worker-dummy1-dummy2
            - name: CORE_SVC_ROLE
              value: WORKER
            - name: ENABLE_TRACING
              value: "true"
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: /gcloud-config/application_default_credentials.json
            - name: JAEGER_SERVICE_NAME
              value: dbaas-core-svc-worker.nightly-ms
            - name: JAEGER_PROPAGATION
              value: jaeger,b3,w3c
          image: 385595570414.dkr.ecr.us-west-2.amazonaws.com/dbaas/nightly/core-svc:4d2fce6884c46f01c7d63f417c38bbd001900d33
          imagePullPolicy: IfNotPresent
          name: core-svc-worker
          readinessProbe:
            failureThreshold: 10
            initialDelaySeconds: 5
            periodSeconds: 5
            successThreshold: 1
            tcpSocket:
              port: 8888
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 100m
              memory: 500Mi
            requests:
              cpu: 100m
              memory: 500Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /etc/core-svc
              name: core-svc-config
            - mountPath: /gcloud-config/
              name: core-svc-gcp-credential-config
            - mountPath: /kube
              name: infra-kubeconfig
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: { }
      serviceAccount: central
      serviceAccountName: central
      terminationGracePeriodSeconds: 30
      volumes:
        - configMap:
            defaultMode: 420
            name: dbaas-core-svc-956dfh98k9
          name: core-svc-config
        - name: core-svc-gcp-credential-config
          secret:
            defaultMode: 420
            secretName: core-svc-gcp-credential-config
        - name: infra-kubeconfig
          secret:
            defaultMode: 420
            secretName: core-svc-infra-kubeconfig
