Repository navigation
open5gs-upf: liveness and readiness probes by default - #242
Conversation
cae8af3 to
7a672fc
Compare
|
Hi, thank you for your contribution! Could we handle or document the customOpen5gsConfig case here? When customOpen5gsConfig is set, templates/configmap.yaml uses it instead of rendering resources/config/upf.yaml. If the default readiness/liveness probes remain enabled but the custom configuration does not contain upf.metrics.server, port 9090 will not be listening and the pod will remain permanently NotReady. I suggest either:
|
|
Thanks @jpontongradiant, good catch. With Rather than making the probes conditional on the custom config, I'd make them independent of it. The UPF always listens for PFCP on UDP 8805, and the image has exec:
command: ["sh", "-c", "ss -lun | grep -q ':{{ .Values.containerPorts.pfcp }} '"]That works with the rendered config and with If you'd rather keep HTTP probes, I can instead render the defaults only when the custom config defines |
|
Thanks, I agree with this approach. I prefer the socket-based probe because it keeps the default probes independent of both metrics.enabled and customOpen5gsConfig, while checking the PFCP socket. Please add tests for both the generated configuration and a customOpen5gsConfig without the metrics server. It would also be useful to document that this probe validates that the local PFCP socket is listening, but does not provide an end-to-end UE or GTP-U health check. Thank you! |
The UPF was the only 5G function without probes: it has no SBI port and its PFCP and GTP-U ports are UDP, so the chart offered custom probes only, empty by default. The pod counted as Ready the moment the container started and was never restarted if the daemon hung. The chart now has the startupProbe, livenessProbe and readinessProbe values of the other charts. The default probes run a command in the container that checks that the PFCP socket (containerPorts.pfcp) is listening, so they work with the generated configuration and with a customOpen5gsConfig alike, and need no metrics server; metrics.enabled keeps its meaning. They verify that the UPF is up and accepting PFCP, not UE sessions or GTP-U forwarding end to end. A custom probe, when set, is used instead of the default one. Two chart-testing value files install the chart with the generated configuration and with a custom configuration that has no metrics server, so both paths are exercised in CI. Fixes Gradiant#238 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7a672fc to
863a331
Compare
|
Done, with the socket probe:
Rebased on |
|
Thank you very much! |
What type of PR is this?
feature
What this PR does / why we need it:
The UPF was the only 5G function deployed without probes. It has no SBI port, and its PFCP and GTP-U ports are UDP, so the chart offered custom probes only, empty by default. The pod counted as Ready the moment the container started, and a dead daemon was noticed only when the container exited. Details in #238.
This PR gives
open5gs-upfthestartupProbe,livenessProbeandreadinessProbevalues the other charts have, with liveness and readiness enabled by default:ss -lun | grep -q ':<containerPorts.pfcp> '. They don't depend on the configuration file in use, so they work with the generatedupf.yamland withcustomOpen5gsConfigalike, and they need no metrics server.metrics.enabledkeeps its meaning: the metrics server is configured only when it is on.customLivenessProbeand so on), when set, is used instead of the default one, so existing custom probes keep working.ci/generated-config-values.yamlandci/custom-config-values.yaml(the generated configuration with the metrics block removed), install the chart both ways in CI.values.yamlsays what the probe checks: that the UPF process is up and its PFCP socket is open. It is not an end-to-end check of UE sessions or GTP-U forwarding, and a daemon that hangs with the socket still open is not caught by it;customLivenessProbeis the place for a deeper check.Tested on kind (
gradiant/open5gs:2.7.5):ss -lunin the container shows the PFCP socket on 8805, and the ConfigMap has no metrics block in either case (run 37536751573).open5gsumbrella chart built from this branch, 5G core with chart defaults, passes the CNTi cert'slivenessandreadinesstests (run 37535114138).Which issue(s) this PR fixes:
Fixes #238
Special notes for your reviewer:
readinessProbe.timeoutSecondsis 5 instead of 1, since an exec probe has to start a process in the container.helm lintpasses. Rendered and checked: defaults,customOpen5gsConfigwithout a metrics server,metrics.enabled=true(metrics server and Service), both probes disabled, and a custom liveness probe.open5gs-upf2.3.4 to 2.3.5, inside the umbrella chart's~2.3.2range. The umbrella chart's own version is not bumped here.Does this PR introduce a user-facing change?
Yes. A default installation now has liveness and readiness probes on the UPF. Both can be turned off with
livenessProbe.enabled=falseandreadinessProbe.enabled=false. Nothing else changes: no new port is opened.Does this PR introduce new external dependencies?
No.
Additional documentation:
🤖 Generated with Claude Code