v0.28.4 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 6




View Source
const (
	// ControllerUnowned indicates that the controller is owned by another controller manager
	//  and thus should NOT be started by this controller manager.
	ControllerUnowned = iota
	// ControllerMigrated indicates that the controller manager should start this controller
	//  with the migration lock.
	// ControllerNonMigrated indicates that the controller manager should start this controller
	//  with the main lock.


This section is empty.


func Enabled

func Enabled(genericConfig *config.GenericControllerManagerConfiguration) bool

Enabled checks whether Leader Migration should be enabled, given the GenericControllerManagerConfiguration. It considers the feature gate first, and will always return false if the feature gate is not enabled.


type FilterFunc

type FilterFunc func(controllerName string) FilterResult

FilterFunc takes a name of controller, returning a FilterResult indicating how to start controller.

type FilterResult

type FilterResult int32

FilterResult indicates whether and how the controller manager should start the controller.

type LeaderMigrator

type LeaderMigrator struct {
	// MigrationReady is closed after the controller manager finishes preparing for the migration lock.
	// After this point, the leader migration process will proceed to acquire the migration lock.
	MigrationReady chan struct{}

	// FilterFunc returns a FilterResult telling the controller manager what to do with the controller.
	FilterFunc FilterFunc

LeaderMigrator holds information required by the leader migration process.

func NewLeaderMigrator

func NewLeaderMigrator(config *internal.LeaderMigrationConfiguration, component string) *LeaderMigrator

NewLeaderMigrator creates a LeaderMigrator with given config for the given component. component indicates which controller manager is requesting this leader migration, and it should be consistent with the component field of ControllerLeaderConfiguration.


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL