apiVersion: apps/v1
kind: Deployment
metadata:
  name: tempo-migrate-service
  annotations:
    sidecar.jaegertracing.io/inject: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tempo-migrate-service
  template:
    metadata:
      labels:
        app: tempo-migrate-service
    spec:
      containers:
        - name: tempo-migrate-service
          command:
            - /command/tempo-migrate/tempo-migrate
          args:
            - --config=/etc/config/config.yaml
          image: 385595570414.dkr.ecr.us-west-2.amazonaws.com/tidbcloud/tidb-management-service:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
              protocol: TCP
          env:
            - name: TIINF_POD_NAME
              value: tempo-migrate-control-service
          readinessProbe:
            failureThreshold: 10
            initialDelaySeconds: 5
            periodSeconds: 5
            successThreshold: 1
            tcpSocket:
              port: 8080
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 2000m
              memory: 1024Mi
          volumeMounts:
            - mountPath: /etc/config
              name: tempo-migrate-config
              readOnly: true
      volumes:
        - name: tempo-migrate-config
          configMap:
            name: tempo-migrate-config
      serviceAccountName: tidb-management-service
