Skip to content

Conversation

@nytamin
Copy link
Member

@nytamin nytamin commented Sep 15, 2025

About the Contributor

This pull request is posted on behalf of the NRK

Type of Contribution

This is a: Feature

New Behavior

This PR adds an opt-in (using CLI arg -healthPort) http-server to Playout Gateway, which exposes the /healthz and /readyz endpoints, which can be used in a Kubernetes envidonment to determine liveness and readyness, see https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.

Affected areas

This PR affects no playout logic, but adds an opt-in http server to playout-gateway

Time Frame

Not urgent, but we would like to get this merged into the in-development release.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@nytamin nytamin force-pushed the feat/pgw-health-endpoints branch from 731f92d to 45b7213 Compare October 6, 2025 09:05
@nytamin nytamin force-pushed the feat/pgw-health-endpoints branch from 45b7213 to a61e282 Compare October 6, 2025 09:12
@nytamin nytamin marked this pull request as ready for review October 6, 2025 09:12
@nytamin nytamin requested a review from a team as a code owner October 6, 2025 09:12
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Julusian
Copy link
Member

Julusian commented Oct 6, 2025

You mentioned doing the same for mos-gateway soon too, it would be good for this HealthEndpoints class should be moved to server-core-integration so we arent making many duplicates of this file as this gets rolled out to everything.

I don't think this has been addressed/responded to, I still think it would be a good idea

I think this would be good to enable by default when running in docker (not sure about dev)

It is possible to define the healthcheck in the dockerfile, which can then be used in simple docker-compose setups (I assume k8s could use it too?) docs.docker.com/reference/dockerfile#healthcheck
I dont think we need to write this today (unless k8s can use it), but having the http port enabled ready for when someone else does want to write it would be beneficial, and save them the effort of figuring out how to rework this port config without breaking existing deployments

In particular, I am worried that it will be easy to set the -healthPort argument, which will break the dockerfile based healthchecks. I am ok with the env variable staying, but I think the argument makes it too visible and easy to break the image

@nytamin nytamin marked this pull request as draft October 6, 2025 10:39
@nytamin
Copy link
Member Author

nytamin commented Oct 6, 2025

Close, in favor of #1533

@nytamin nytamin closed this Oct 6, 2025
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.

3 participants