package config
import "k8s.io/controller-manager/pkg/leadermigration/config"
Index ¶
- Constants
- func DefaultLeaderMigrationConfiguration() *internal.LeaderMigrationConfiguration
- func ReadLeaderMigrationConfiguration(configFilePath string) (*internal.LeaderMigrationConfiguration, error)
- func ValidateLeaderMigrationConfiguration(config *internal.LeaderMigrationConfiguration) (allErrs field.ErrorList)
Constants ¶
const ResourceLockEndpoints = "endpoints"
ResourceLockEndpoints is the resourceLock value for 'endpoints' API
const ResourceLockLeases = "leases"
ResourceLockLeases is the resourceLock value for 'leases' API
Functions ¶
func DefaultLeaderMigrationConfiguration ¶
func DefaultLeaderMigrationConfiguration() *internal.LeaderMigrationConfiguration
DefaultLeaderMigrationConfiguration returns the default LeaderMigrationConfiguration that is valid for this release of Kubernetes.
func ReadLeaderMigrationConfiguration ¶
func ReadLeaderMigrationConfiguration(configFilePath string) (*internal.LeaderMigrationConfiguration, error)
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 ValidateLeaderMigrationConfiguration ¶
func ValidateLeaderMigrationConfiguration(config *internal.LeaderMigrationConfiguration) (allErrs field.ErrorList)
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.
Source Files ¶
config.go default.go
- Version
- v0.32.2 (latest)
- Published
- Feb 13, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 2 months ago –
Tools for package owners.