server/config: methods for adding healthz and livez health checks

Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
This commit is contained in:
Bryce Palmer
2026-02-03 12:30:57 -05:00
parent 79aaabb40f
commit 1d5082dd27

View File

@@ -573,6 +573,18 @@ func (c *Config) AddHealthChecks(healthChecks ...healthz.HealthChecker) {
c.ReadyzChecks = append(c.ReadyzChecks, healthChecks...)
}
// AddHealthzChecks adds the provided health checks to our config to be exposed by the
// healthz endpoint of our configured apiserver.
func (c *Config) AddHealthzChecks(healthChecks ...healthz.HealthChecker) {
c.HealthzChecks = append(c.HealthzChecks, healthChecks...)
}
// AddLivezChecks adds the provided health checks to our config to be exposed by the
// livez endpoint of our configured apiserver.
func (c *Config) AddLivezChecks(healthChecks ...healthz.HealthChecker) {
c.LivezChecks = append(c.LivezChecks, healthChecks...)
}
// AddReadyzChecks adds a health check to our config to be exposed by the readyz endpoint
// of our configured apiserver.
func (c *Config) AddReadyzChecks(healthChecks ...healthz.HealthChecker) {