Help us shape the future of Go! Take the 2026 Go Developer Survey

probes

package
v0.122.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 21

Documentation

Overview

Package probes contains a helper to configure sensible default health and ready probes on a controller-runtime manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeaderElectedReadyz added in v0.121.0

func LeaderElectedReadyz(elected <-chan struct{}) healthz.Checker

LeaderElectedReadyz returns a readiness check that passes when the manager has been elected leader. It is intended for readiness checks of servers that are only started by the leader.

func SetupChecks

func SetupChecks(mgr ctrl.Manager, log logr.Logger)

SetupChecks configures simple default ready and health probes on the given mgr.

The func can be used in the main.go file of your controller, after initialisation of the manager:

	func main() {
		mgr, err := ctrl.NewManager(cfg, ctrl.Options{})
		if err != nil {
			log.Error(err, "unable to start manager")
			os.Exit(1)
		}
		probes.SetupChecks(mgr, log)
 }

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL