apiVersion: apps/v1
kind: Deployment
metadata:
  name: tempo-wrapper
spec:
  replicas: 2
  selector:
    matchLabels:
      app: tempo-wrapper
  template:
    metadata:
      labels:
        app: tempo-wrapper
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9090"
        prometheus.io/path: /metrics
    spec:
      containers:
        - name: tempo-wrapper
          command:
            - /command/tempo-wrapper/tempo-wrapper
          args:
            - -config=/etc/tempo-wrapper/config.yaml
          image: 385595570414.dkr.ecr.us-west-2.amazonaws.com/tidbcloud/tidb-management-service:latest
          imagePullPolicy: IfNotPresent
          ports:
            - name: service
              protocol: TCP
              containerPort: 8080
            - name: metrics
              protocol: TCP
              containerPort: 9090
          env:
            - name: GIN_MODE
              value: release
            - name: TIINF_POD_NAME
              value: tempo-wrapper-http-service
          readinessProbe:
            httpGet:
              port: 8080
              path: /healthz
              scheme: HTTP
            failureThreshold: 5
            initialDelaySeconds: 5
            periodSeconds: 15
          resources:
            limits:
              cpu: 500m
              memory: 512Mi
          volumeMounts:
            - mountPath: /etc/tempo-wrapper
              name: config
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: tempo-wrapper
      serviceAccountName: tidb-management-service
