Skip to content

Enable health endpoint on the kbs pods - #172

Merged
lmilleri merged 1 commit into
confidential-containers:mainfrom
ngopalak-redhat:ngopalak/health-endpoint
Aug 20, 2026
Merged

Enable health endpoint on the kbs pods#172
lmilleri merged 1 commit into
confidential-containers:mainfrom
ngopalak-redhat:ngopalak/health-endpoint

Conversation

@ngopalak-redhat

Copy link
Copy Markdown
Contributor

While trying out the trustee, it was hard to find out if the trustee really came up. I used curl on the health endpoint, hence I thought its good to add that as a probe.

The /healthz endpoint was added to KBS in trustee#1398 (merged 2026-06-02), which returns HTTP 200 on the same port 8080 that serves the KBS API. However, the trustee-operator never wired up Kubernetes probes to use it. Without probes, Kubernetes has no way to detect if the KBS process hangs or fails to serve requests.

Pods stay in Running state even when unhealthy, and the deployment reports Available the moment the container starts, before KBS is actually ready to accept connections. This change adds readiness and liveness probes to the KBS container using HTTPGet against /healthz on port 8080, with the scheme (HTTP or HTTPS) auto-detected from the existing isHttpsConfigPresent() helper. This ensures traffic is only routed to pods that are genuinely serving, and hung processes are automatically restarted.

@ngopalak-redhat
ngopalak-redhat requested a review from a team as a code owner August 18, 2026 11:16
Signed-off-by: Neeraj Krishna Gopalakrishna <ngopalak@redhat.com>
@ngopalak-redhat
ngopalak-redhat force-pushed the ngopalak/health-endpoint branch from 798cd2d to 8c6cff9 Compare August 18, 2026 11:16

@lmilleri lmilleri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm thanks

@lmilleri
lmilleri merged commit dec08ea into confidential-containers:main Aug 20, 2026
5 checks passed
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