Skip to content

FREYA-3120: Add a dedicated health check endpoint for kube-probe and uptimerobot - #67

Merged
RMCrean merged 1 commit into
masterfrom
rory/ignore-health-checks-in-logs
Nov 11, 2026
Merged

RMCrean merged 1 commit into
masterfrom
rory/ignore-health-checks-in-logs

Conversation

@RMCrean

@RMCrean RMCrean commented Nov 11, 2026

Copy link
Copy Markdown
Member

This PR is essentially identical to ScilifelabDataCentre/data.scilifelab.se#517 and done for the same reasons. Rather than repeat myself it's best to take a look there. The deploy order is same here (the k8s probes and the UptimeRobot monitor should only be switched to /healthz after this image is deployed, otherwise they will get a 404.)

The only difference in nginx configuration between the 2 sites was this setting:

# dsw-appendix
add_header X-Frame-Options DENY always;
# data.scilifelab.se
add_header X-Frame-Options SAMEORIGIN always;

Either settings is safe/okay so I've kept them as they are/rather than changing either one. To validate the changes:

# setup
docker build -t dsw-appendix:test .
docker run -d --name dsw-test -p 8080:8080 dsw-appendix:test
# tests
curl -i localhost:8080/healthz # 200 ok
curl -I localhost:8080/healthz # 200  (no "ok" because HEAD method)
curl -I localhost:8080/ # 200 and home page content
curl -i localhost:8080/does-not-exist # 404 with custom hugo 404 page
# validate
docker logs dsw-test # /healthz should not appear; / and /does-not-exist should
# clean up
docker rm -f dsw-test

kubectl probe and uptime robot can poll there and we can ignore these access logs to stop
@RMCrean
RMCrean requested a review from a team as a code owner November 11, 2026 13:04
@RMCrean
RMCrean merged commit 3b8fe0f into master Nov 11, 2026
2 checks passed
@RMCrean
RMCrean deleted the rory/ignore-health-checks-in-logs branch November 11, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants