Skip to content

feat(helm): Add health probes to gateway component - #18545

Merged
Jayclifford345 merged 6 commits into
grafana:mainfrom
lindhe:gateway-healthprobes
Sep 24, 2025
Merged

feat(helm): Add health probes to gateway component#18545
Jayclifford345 merged 6 commits into
grafana:mainfrom
lindhe:gateway-healthprobes

Conversation

@lindhe

@lindhe lindhe commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This change makes it possibe to configure livenessProbe and startupProbe to the nginx container in the gateway pods. Also adds a guard for when the readinessProbe is unset.

Which issue(s) this PR fixes:

Partially addresses #13678

Special notes for your reviewer:

Partially replaces #15359

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
@lindhe
lindhe requested a review from a team as a code owner July 23, 2025 12:28
@lindhe lindhe changed the title Gateway healthprobes Jul 23, 2025

@jkroepke jkroepke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your PR, please check comments.

@@ -1178,13 +1178,17 @@ gateway:
{{- end }}
# -- Existing basic auth secret to use. Must contain '.htpasswd'
existingSecret: null
# -- liveness probe for the nginx container in the gateway pods.
livenessProbe: {}

@jkroepke jkroepke Jul 23, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What did you think about set

  livenessProbe:
    httpGet:
      path: /loki/api/v1/status/buildinfo
      port: http-metrics
    initialDelaySeconds: 15
    timeoutSeconds: 1

as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My intention was to create a PR that makes the probes configurable but do not change any behavior, so it does not become a breaking change and have to wait until the next major release to be merged.

But if you prefer to also configure sensible probes wherever possible, that's fine by be. Do you want me to add the suggested probes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Jayclifford345 WDYT?

Loki Operator uses

lokiLivenessPath = "/loki/api/v1/status/buildinfo"

by default

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jkroepke I've completely lost track of this PR. Is it in a good state or no?

@jkroepke jkroepke Sep 12, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@lindhe Yeah. Please update the branch

Comment thread production/helm/loki/CHANGELOG.md Outdated

@jkroepke jkroepke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

lindhe and others added 4 commits September 19, 2025 20:38
This change makes it possibe to configure `livenessProbe` and
`startupProbe` to the nginx container in the gateway pods.
Also adds a guard for when the `readinessProbe` is unset.

Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Done via the following command:

```shell
docker run -it --rm -v "$(pwd):/go" --entrypoint bash -e BUILD_IN_CONTAINER=false grafana/loki-build-image:0.34.6 -c 'git config --global --add safe.directory /go; make -BC docs sources/setup/install/helm/reference.md'
```

Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
@lindhe
lindhe force-pushed the gateway-healthprobes branch from dd77a88 to 4e99a09 Compare September 19, 2025 18:40

@Jayclifford345 Jayclifford345 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Jayclifford345
Jayclifford345 merged commit 82aa322 into grafana:main Sep 24, 2025
80 checks passed
@lindhe
lindhe deleted the gateway-healthprobes branch September 24, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants