controller-managerk8s.io/controller-manager/app Index | Files

package app

import "k8s.io/controller-manager/app"

Index

Functions

func BuildHandlerChain

func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.AuthorizationInfo, authenticationInfo *apiserver.AuthenticationInfo) http.Handler

BuildHandlerChain builds a handler chain with a base handler and CompletedConfig.

func IsControllerEnabled

func IsControllerEnabled(name string, disabledByDefaultControllers sets.String, controllers []string) bool

IsControllerEnabled check if a specified controller enabled or not.

func NewBaseHandler

func NewBaseHandler(c *componentbaseconfig.DebuggingConfiguration, healthzHandler http.Handler) *mux.PathRecorderMux

NewBaseHandler takes in CompletedConfig and returns a handler.

func WaitForAPIServer

func WaitForAPIServer(client clientset.Interface, timeout time.Duration) error

WaitForAPIServer waits for the API Server's /healthz endpoint to report "ok" with timeout.

Types

type ControllerContext

type ControllerContext struct {
	// ClientBuilder will provide a client for this controller to use
	ClientBuilder clientbuilder.ControllerClientBuilder

	// InformerFactory gives access to informers for the controller.
	InformerFactory informers.SharedInformerFactory

	// ObjectOrMetadataInformerFactory gives access to informers for typed resources
	// and dynamic resources by their metadata. All generic controllers currently use
	// object metadata - if a future controller needs access to the full object this
	// would become GenericInformerFactory and take a dynamic client.
	ObjectOrMetadataInformerFactory informerfactory.InformerFactory

	// DeferredDiscoveryRESTMapper is a RESTMapper that will defer
	// initialization of the RESTMapper until the first mapping is
	// requested.
	RESTMapper *restmapper.DeferredDiscoveryRESTMapper

	// Stop is the stop channel
	Stop <-chan struct{}

	// InformersStarted is closed after all of the controllers have been initialized and are running.  After this point it is safe,
	// for an individual controller to start the shared informers. Before it is closed, they should not.
	InformersStarted chan struct{}

	// ResyncPeriod generates a duration each time it is invoked; this is so that
	// multiple controllers don't get into lock-step and all hammer the apiserver
	// with list requests simultaneously.
	ResyncPeriod func() time.Duration

	// ControllerManagerMetrics provides a proxy to set controller manager specific metrics.
	ControllerManagerMetrics *controllersmetrics.ControllerManagerMetrics
}

ControllerContext defines the context object for controller

Source Files

controllercontext.go helper.go serve.go

Version
v0.32.2 (latest)
Published
Feb 13, 2025
Platform
linux/amd64
Imports
26 packages
Last checked
2 months ago

Tools for package owners.