Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerContext ¶
type ControllerContext struct { Opts *options.ControllerManagerOptions KubeConfig *rest.Config KubeClient *kubernetes.Clientset ElectionClient *kubernetes.Clientset ClusternetClient *clusternet.Clientset McsClient *mcsclientset.Clientset ClusternetInformerFactory informers.SharedInformerFactory KubeInformerFactory kubeinformers.SharedInformerFactory McsInformerFactory mcsinformers.SharedInformerFactory ClientBuilder clientbuilder.ControllerClientBuilder EventRecorder record.EventRecorder // 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{} }
ControllerContext defines the context object for controller.
func (ControllerContext) IsControllerEnabled ¶
func (c ControllerContext) IsControllerEnabled(name string, controllersDisabledByDefault sets.String) bool
IsControllerEnabled check if a specified controller enabled or not.
func (*ControllerContext) StartControllers ¶
func (c *ControllerContext) StartControllers(ctx context.Context, initializers Initializers, controllersDisabledByDefault sets.String) error
StartControllers starts a set of controllers with a specified ControllerContext
func (*ControllerContext) StartShardInformerFactories ¶
func (c *ControllerContext) StartShardInformerFactories(ctx context.Context)
type InitFunc ¶
type InitFunc func(controllerContext *ControllerContext, ctx context.Context) (enabled bool, err error)
InitFunc is used to launch a particular controller. Any error returned will cause the controller process to `Fatal` The bool indicates whether the controller was enabled.
type Initializers ¶
Initializers is a public map of named controller groups
func (Initializers) KnownControllerNames ¶
func (i Initializers) KnownControllerNames() []string
KnownControllerNames returns all known controller names
Click to show internal directories.
Click to hide internal directories.