Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(ctx context.Context, rootLogger string, start StartFunc, opts Options, schemes runtime.SchemeBuilder, localMode bool) error
Start a controller with the given reconciler. Handles bootstrapping local manager + multicluster watches. localMode will start the controller as an "local" only configured to do i/o to local cluster.
Types ¶
type Options ¶
type Options struct { // MetricsBindPort is the TCP port that the controller should bind to // for serving prometheus metrics. // It can be set to 0 to disable the metrics serving. MetricsBindPort uint32 // MasterNamespace if specified restricts the Master manager's cache to watch objects in the desired namespace. // Defaults to all namespaces. // // Note: If a namespace is specified, controllers can still Watch for a cluster-scoped resource (e.g Node). For namespaced resources the cache will only hold objects from the desired namespace. MasterNamespace string // enables verbose mode VerboseMode bool // ManagementContext if specified read the KubeConfig for the management cluster from this context. Only applies when running out of cluster. ManagementContext string // Reference to the Settings object that the controller should use. SettingsRef v1.ObjectRef }
bootstrap options for starting discovery
func (*Options) AddToFlags ¶
convenience function for setting these options via spf13 flags
type StartFunc ¶
type StartFunc func( ctx context.Context, parameters StartParameters, ) error
the start function that will be called with the initialized parameters
type StartParameters ¶
type StartParameters struct { MasterManager manager.Manager McClient multicluster.Client // nil if running in agent mode Clusters multicluster.Interface // nil if running in agent mode SnapshotHistory *stats.SnapshotHistory // Reference to Settings object this controller uses. SettingsRef v1.ObjectRef // enable additional logging VerboseMode bool }
StartParameters specify paramters for starting a generic controller which may need access to its local cluster as well as remote (multicluster) clients and managers
Click to show internal directories.
Click to hide internal directories.