apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: metrics
  labels:
    app.kubernetes.io/name: tempo
  name: tempo
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: tempo
  strategy:
    type: Recreate
  template:
    metadata:
      namespace: metrics
      labels:
        app.kubernetes.io/name: tempo
    spec:
      securityContext:
        runAsUser: 1000
        runAsGroup: 1000
        fsGroup: 1000
      containers:
        - args:
            - -config.file=/etc/tempo/config.yaml
          image: grafana/tempo:2.5.0
          name: tempo
          ports:
            - containerPort: 3200
              protocol: TCP
            - containerPort: 4317
              protocol: TCP
            - containerPort: 4318
              protocol: TCP

          volumeMounts:
            - mountPath: /etc/tempo/config.yaml
              name: tempo-config
              subPath: config.yaml
            - mountPath: /tempo-data
              name: tempo-data
      restartPolicy: Always
      volumes:
        - configMap:
            items:
              - key: config.yaml
                path: config.yaml
            name: tempo-config
          name: tempo-config
        - name: tempo-data
          persistentVolumeClaim:
            claimName: tempo-data