- name: tempo
  namespace: observability
  create_namespace: true
  chart_ref: {{ .Modules.Observability.Tracing.Tempo.ChartRef }}
  chart_version: {{ .Modules.Observability.Tracing.Tempo.ChartVersion }}
  {{- if and .Modules.Observability.Enabled .Modules.Observability.Tracing.Enabled }}
  release_state: "present"
  {{- else }}
  release_state: "absent"
  {{- end }}
  values:
    replicas: 1

    tempo:
      repository: {{ .Modules.Observability.Tracing.Tempo.Image }}
      tag: "{{ .Modules.Observability.Tracing.Tempo.Tag }}"
      pullPolicy: IfNotPresent

      updateStrategy: RollingUpdate

      memBallastSizeMbs: 1024
      multitenancyEnabled: false
      reportingEnabled: false

      metricsGenerator:
        enabled: false
        remoteWriteUrl: "http://prometheus.monitoring:9090/api/v1/write"
      retention: {{ .Modules.Observability.Tracing.Tempo.Retention }}
      global_overrides:
        per_tenant_override_config: /conf/overrides.yaml

      server:
        http_listen_port: {{ .Modules.Observability.Tracing.Tempo.ListenPort }}
      storage:
        trace:
          backend: local
          local:
            path: /var/tempo/traces
          wal:
            path: /var/tempo/wal
      receivers:
        otlp:
          protocols:
            grpc:
              endpoint: "0.0.0.0:4317"
            http:
              endpoint: "0.0.0.0:4318"

    tempoQuery:
      repository: {{ .Modules.Observability.Tracing.Tempo.TempoQuery.Image }}
      tag: {{ .Modules.Observability.Tracing.Tempo.TempoQuery.Tag }}
      pullPolicy: IfNotPresent

      enabled: true

      service:
        port: {{ .Modules.Observability.Tracing.Tempo.TempoQuery.ListenPort }}

      ingress:
        enabled: false

    serviceAccount:
      create: true
      automountServiceAccountToken: true

    service:
      type: ClusterIP

    serviceMonitor:
      enabled: true

    persistence:
      enabled: true
      storageClassName: {{ .Modules.Observability.Tracing.Tempo.Persistence.StorageClass }}
      accessModes:
        - ReadWriteOnce
      size: {{ .Modules.Observability.Tracing.Tempo.Persistence.StorageSize }}

    priorityClassName: null
