Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerWatcher ¶
type ControllerWatcher interface {
// Watch add the given objects to the controller watch list
Watch(objects ...WatchedObjects) (err error)
// AreAllObjectsWatched verifies if this instance already has registered every required object in the watch list
AreAllObjectsWatched() bool
// IsGroupWatched verifies if the given group has it's objects watched or not
IsGroupWatched(group string) bool
}
ControllerWatcher helps to add required objects to the controller watch list given the required runtime objects
func NewControllerWatcher ¶
func NewControllerWatcher(discoveryClient discovery.DiscoveryInterface, manager controllerruntime.Manager, controller controller.Controller, owner runtime.Object) ControllerWatcher
NewControllerWatcher creates a new ControllerWatcher to control the objects that needed to be watched
type WatchedObjects ¶
type WatchedObjects struct {
// GroupVersion for the watched objects
GroupVersion schema.GroupVersion
// AddToScheme function to register the Scheme to the Kubernetes Client. This will enable the controller to query for those objects during the reconcile loop.
AddToScheme func(scheme *runtime.Scheme) error
// Objects list of required objects that should be watched by the controller
Objects []runtime.Object
// Owner of the object if different from the actual controller
Owner runtime.Object
}
WatchedObjects objects that the controller supposed to watch for
Click to show internal directories.
Click to hide internal directories.