Skip to content

Conversation

unique-jakub
Copy link
Contributor

  • Add livenessProbe support to single binary StatefulSet using global loki.livenessProbe configuration
  • Maintains consistency with other Loki components' probe configuration patterns

What this PR does / why we need it:

This PR adds support for configurable livenessProbe to the single binary StatefulSet deployment mode. Currently, the single binary StatefulSet only supports readinessProbe but lacks livenessProbe configuration, which is available in other Loki components.

The implementation uses the global loki.livenessProbe configuration (similar to how other components like distributor, querier, and index-gateway handle probes), ensuring consistency across the entire chart.

This enables users to:

  • Configure custom liveness probe settings for better health monitoring
  • Customize probe timing (initialDelaySeconds, periodSeconds, etc.) based on their deployment requirements
  • Improve Pod lifecycle management in Kubernetes environments

Which issue(s) this PR fixes:
Fixes #15191

Special notes for your reviewer:

  • The implementation follows the same pattern used by other Loki components (distributor, querier, index-gateway, etc.) which use {{- with .Values.loki.livenessProbe }}
  • No breaking changes - existing deployments continue to work unchanged since loki.livenessProbe defaults to {}
  • The single binary StatefulSet now has feature parity with other deployment modes regarding probe configuration

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@unique-jakub unique-jakub requested a review from a team as a code owner August 31, 2025 09:40
@CLAassistant
Copy link

CLAassistant commented Aug 31, 2025

CLA assistant check
All committers have signed the CLA.

- Add livenessProbe configuration option to singleBinary section in values.yaml
- Maintains consistency with other Loki components' probe configuration patterns
@unique-jakub unique-jakub force-pushed the feat/single-binary-liveness-probe branch from 2a14288 to 4409ca0 Compare August 31, 2025 09:41
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
Signed-off-by: unique-jakub <jakub@unique.ch>
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Sep 8, 2025
Copy link
Contributor

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
@pull-request-size pull-request-size bot added size/XS and removed size/S labels Sep 9, 2025
Copy link
Contributor

@Jayclifford345 Jayclifford345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Jayclifford345 Jayclifford345 enabled auto-merge (squash) September 9, 2025 08:26
@Jayclifford345 Jayclifford345 merged commit 18b8995 into grafana:main Sep 9, 2025
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grafana loki deploys sometimes with a bad read pod
4 participants