Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ControllerOwned 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 thte migration lock. ControllerMigrated // ControllerNonMigrated indicates that the controller manager should start this controller // with thte main lock. ControllerNonMigrated )
Variables ¶
This section is empty.
Functions ¶
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.
func FeatureEnabled ¶
func FeatureEnabled() bool
FeatureEnabled tells if leader migration is enabled through the feature gate.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.