const ResourceLockLeases … const ResourceLockEndpoints … var cfgScheme … func init() { … } // ReadLeaderMigrationConfiguration reads LeaderMigrationConfiguration from a YAML file at the given path. // The parsed LeaderMigrationConfiguration may be invalid. // It returns an error if the file did not exist. func ReadLeaderMigrationConfiguration(configFilePath string) (*internal.LeaderMigrationConfiguration, error) { … } // ValidateLeaderMigrationConfiguration validates the LeaderMigrationConfiguration against common errors. // It checks required names and whether resourceLock is either 'leases' or 'endpoints'. // It will return nil if it does not find anything wrong. func ValidateLeaderMigrationConfiguration(config *internal.LeaderMigrationConfiguration) (allErrs field.ErrorList) { … } func validateControllerLeaderConfiguration(path *field.Path, config *internal.ControllerLeaderConfiguration) (allErrs field.ErrorList) { … }