grpc-proto icon indicating copy to clipboard operation
grpc-proto copied to clipboard

Add List method to Health service

Open marcoshuck opened this issue 1 year ago • 1 comments
trafficstars

Context

Clients cannot get a list of the services a certain server is watching to and their respective status.

In the context of Kubernetes, we have livez and readyz endpoints, by listing all the services a server is checking, we could return a response like the /readyz?verbose Kubernetes API returns:

[+]ping ok
[+]log ok
[+]etcd ok
[+]poststarthook/start-kube-apiserver-admission-initializer ok
[+]poststarthook/generic-apiserver-start-informers ok
[+]poststarthook/start-apiextensions-informers ok
[+]poststarthook/start-apiextensions-controllers ok
[+]poststarthook/crd-informer-synced ok
[+]poststarthook/bootstrap-controller ok
[+]poststarthook/rbac/bootstrap-roles ok
[+]poststarthook/scheduling/bootstrap-system-priority-classes ok
[+]poststarthook/start-cluster-authentication-info-controller ok
[+]poststarthook/start-kube-aggregator-informers ok
[+]poststarthook/apiservice-registration-controller ok
[+]poststarthook/apiservice-status-available-controller ok
[+]poststarthook/kube-apiserver-autoregistration ok
[+]autoregister-completion ok
[+]poststarthook/apiservice-openapi-controller ok
healthz check passed

Use case

This is not only useful for having status reports like Kubernetes readyz endpoints; it also allows services to simplify the set up when creating microservices that publish their status to status page systems such as:

  • https://cachethq.io/
  • https://www.atlassian.com/software/statuspage

Change

This PR introduces a new List endpoint to the Health service in order to list all the services that a certain server is watching to.

Alternative solution

We could extract the List endpoint into a new service to avoid breaking the v1 API. A new HealthLister (or any other name) must be created.

marcoshuck avatar Feb 12 '24 04:02 marcoshuck

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: marcoshuck / name: Marcos Huck (3aac5dabaa7fbf0e00905bd8f82534ff1236b887, c99bdd7a70ab132dbe957c3f7881f16b1352ad26, 0879266b79e40eb00e9f5ee024ce012b47f6f52e, d5aa37039de7200e02fa5336d69e83536836d58e, d19798106ae193ecddee9d6277364c1fdc614ea1, 76a6dc18c0ad40304415aacd0d72f153ff176232)

Proposal: https://github.com/grpc/proposal/pull/468

marcoshuck avatar Dec 17 '24 15:12 marcoshuck

cc @ejona86 @markdroth

dfawley avatar Mar 20 '25 15:03 dfawley

@ejona86, please take a look, and then we can get this merged.

markdroth avatar Mar 25 '25 00:03 markdroth