Skip to content

feature: Implement readyz and livez handlers for the proxy server #3916

@ntnn

Description

@ntnn

Feature Description

Currently the proxy server only returns OK without any actual health/liveness checks:

kcp/pkg/proxy/server.go

Lines 146 to 158 in 301a8f7

mux := http.NewServeMux()
// TODO: implement proper readyz handler
mux.Handle("/readyz", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK")) //nolint:errcheck
}))
// TODO: implement proper livez handler
mux.Handle("/livez", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK")) //nolint:errcheck
}))
mux.Handle("/", handler)
s.Handler = mux

Proposed Solution

Implement the checks.
livez could even stay as it. healthz could check the informer state with https://pkg.go.dev/k8s.io/apiserver@v0.35.2/pkg/server/healthz

Alternative Solutions

No response

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions