grafana / helm-charts

Apache License 2.0
1.61k stars 2.24k forks source link

[Tempo] Add Readiness and Liveness Probe Configuration Options to Tempo Helm Chart #3185

Open Mistral-valaise opened 3 months ago

Mistral-valaise commented 3 months ago

The Grafana Tempo Helm chart(https://github.com/grafana/helm-charts/tree/main/charts/tempo) currently lacks the ability to configure readiness and liveness probes. These probes are essential for monitoring and ensuring the health and availability of the Tempo service in a Kubernetes environment. Without these probes, users have to manually modify the Helm chart templates to include this critical functionality.

Proposed Solution:

Add configurable options for readiness and liveness probes in the values.yaml file of the Tempo Helm chart. This will allow users to define their own probe configurations without needing to alter the chart templates directly. The configuration should include parameters such as initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, and successThreshold.

Example Configuration:

...
tempo:
  server:
    http_listen_port: 3100

  livenessProbe:
    httpGet:
      path: /ready
      port: 3100
    initialDelaySeconds: 10
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 3
    successThreshold: 1

  readinessProbe:
    httpGet:
      path: /ready
      port: 3100
    initialDelaySeconds: 10
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 3
    successThreshold: 1
....

note that the "statefulset.yaml" also need to be updated something like this:

...
      containers:
      - args:
        - -config.file=/conf/tempo.yaml
        - -mem-ballast-size-mbs={{ .Values.tempo.memBallastSizeMbs }}
        {{- range $key, $value := .Values.tempo.extraArgs }}
        - "-{{ $key }}{{ if $value }}={{ $value }}{{ end }}"
        {{- end }}
        image: {{ .Values.tempo.repository }}:{{ .Values.tempo.tag | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.tempo.pullPolicy }}
        name: tempo
...
        livenessProbe:
          {{- toYaml .Values.tempo.livenessProbe | nindent 12 }}
        readinessProbe:
          {{- toYaml .Values.tempo.readinessProbe | nindent 12 }}
        resources:
          {{- toYaml .Values.tempo.resources | nindent 10 }}
...

Benefits:

Improved reliability of Tempo pods. Simplified customization of health checks. Enhanced user experience by reducing the need for manual chart modifications. Steps to Reproduce:

Deploy the current Grafana Tempo Helm chart. Observe the absence of readiness and liveness probe configurations in the values.yaml file. Expected Outcome:

The Helm chart should provide out-of-the-box support for configuring readiness and liveness probes via the values.yaml file.

AdamCzepiel78 commented 3 months ago

Our department is already using the Helm chart, but due to the missing liveness and readiness checks, we have to manually download the chart and update it manually with changing version numbers. Integrating the readiness and liveness checks into the values.yaml would save work and make it easier.