INNER CODE UNIT · Go

configureChecks

backube/volsync · cmd/main.go:114

func configureChecks(mgr manager.Manager) error {
	if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
		return fmt.Errorf("unable to setup health check: %w", err)
	}
	if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
		return fmt.Errorf("unable to setup ready check: %w", err)
	}
	return nil
}

// addCommandFlags Configures flags to be bound to the VolSync command.
func addCommandFlags(probeAddr *string, metricsAddr *string, enableLeaderElection *bool, secureMetrics *bool,
	metricsRequireRBAC *bool, metricsCertPath *string, metricsCertName *string, metricsCertKey *string,
	enableHTTP2 *bool) {
	flag.StringVar(metricsAddr, "metrics-bind-address", ":0", "The address the metric endpoint binds to."+
		"Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service.")
	flag.BoolVar(secureMetrics, "metrics-secure", true,
		"If set, the metrics endpoint is served securely via HTTPS. Use --metrics-secure=false to use HTTP instead.")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…