Documentation ¶
Index ¶
- func AnyConfigFileAndDefaultsToInternal(cfgPath string) (runtime.Object, error)
- func BytesToInternalConfig(b []byte) (*kubeadmapi.InitConfiguration, error)
- func ChooseAPIServerBindAddress(bindAddress net.IP) (net.IP, error)
- func ConfigFileAndDefaultsToInternalConfig(cfgPath string, defaultversionedcfg *kubeadmapiv1alpha3.InitConfiguration) (*kubeadmapi.InitConfiguration, error)
- func DetectUnsupportedVersion(b []byte) error
- func FetchConfigFromFileOrCluster(client clientset.Interface, w io.Writer, logPrefix, cfgPath string, ...) (*kubeadmapi.InitConfiguration, error)
- func LowercaseSANs(sans []string)
- func MarshalClusterConfigurationToBytes(clustercfg *kubeadmapi.ClusterConfiguration, gv schema.GroupVersion) ([]byte, error)
- func MarshalInitConfigurationToBytes(cfg *kubeadmapi.InitConfiguration, gv schema.GroupVersion) ([]byte, error)
- func MarshalKubeadmConfigObject(obj runtime.Object) ([]byte, error)
- func NodeConfigFileAndDefaultsToInternalConfig(cfgPath string, defaultversionedcfg *kubeadmapiv1alpha3.JoinConfiguration) (*kubeadmapi.JoinConfiguration, error)
- func NormalizeKubernetesVersion(cfg *kubeadmapi.ClusterConfiguration) error
- func SetAPIEndpointDynamicDefaults(cfg *kubeadmapi.APIEndpoint) error
- func SetBootstrapTokensDynamicDefaults(cfg *[]kubeadmapi.BootstrapToken) error
- func SetClusterDynamicDefaults(cfg *kubeadmapi.ClusterConfiguration, advertiseAddress string, bindPort int32) error
- func SetInitDynamicDefaults(cfg *kubeadmapi.InitConfiguration) error
- func SetJoinDynamicDefaults(cfg *kubeadmapi.JoinConfiguration) error
- func SetNodeRegistrationDynamicDefaults(cfg *kubeadmapi.NodeRegistrationOptions, masterTaint bool) error
- func VerifyAPIServerBindAddress(address string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyConfigFileAndDefaultsToInternal ¶
AnyConfigFileAndDefaultsToInternal reads either a InitConfiguration or JoinConfiguration and unmarshals it
func BytesToInternalConfig ¶
func BytesToInternalConfig(b []byte) (*kubeadmapi.InitConfiguration, error)
BytesToInternalConfig converts a byte slice to an internal, defaulted and validated configuration object. The byte slice may contain one or many different YAML documents. These YAML documents are parsed one-by-one and well-known ComponentConfig GroupVersionKinds are stored inside of the internal InitConfiguration struct
func ChooseAPIServerBindAddress ¶
ChooseAPIServerBindAddress is a wrapper for netutil.ChooseBindAddress that also handles the case where no default routes were found and an IP for the API server could not be obatained.
func ConfigFileAndDefaultsToInternalConfig ¶
func ConfigFileAndDefaultsToInternalConfig(cfgPath string, defaultversionedcfg *kubeadmapiv1alpha3.InitConfiguration) (*kubeadmapi.InitConfiguration, error)
ConfigFileAndDefaultsToInternalConfig takes a path to a config file and a versioned configuration that can serve as the default config If cfgPath is specified, defaultversionedcfg will always get overridden. Otherwise, the default config (often populated by flags) will be used. Then the external, versioned configuration is defaulted and converted to the internal type. Right thereafter, the configuration is defaulted again with dynamic values (like IP addresses of a machine, etc) Lastly, the internal config is validated and returned.
func DetectUnsupportedVersion ¶
DetectUnsupportedVersion reads YAML bytes, extracts the TypeMeta information and errors out with an user-friendly message if the API spec is too old for this kubeadm version
func FetchConfigFromFileOrCluster ¶
func FetchConfigFromFileOrCluster(client clientset.Interface, w io.Writer, logPrefix, cfgPath string, newControlPlane bool) (*kubeadmapi.InitConfiguration, error)
FetchConfigFromFileOrCluster fetches configuration required for upgrading your cluster from a file (which has precedence) or a ConfigMap in the cluster
func LowercaseSANs ¶
func LowercaseSANs(sans []string)
LowercaseSANs can be used to force all SANs to be lowercase so it passes IsDNS1123Subdomain
func MarshalClusterConfigurationToBytes ¶
func MarshalClusterConfigurationToBytes(clustercfg *kubeadmapi.ClusterConfiguration, gv schema.GroupVersion) ([]byte, error)
MarshalClusterConfigurationToBytes marshals the internal ClusterConfiguration object to bytes. It writes the embedded ComponentConfiguration objects out as separate YAML documents
func MarshalInitConfigurationToBytes ¶
func MarshalInitConfigurationToBytes(cfg *kubeadmapi.InitConfiguration, gv schema.GroupVersion) ([]byte, error)
MarshalInitConfigurationToBytes marshals the internal InitConfiguration object to bytes. It writes the embedded ClusterConfiguration object with ComponentConfigs out as separate YAML documents
func MarshalKubeadmConfigObject ¶
MarshalKubeadmConfigObject marshals an Object registered in the kubeadm scheme. If the object is a InitConfiguration or ClusterConfiguration, some extra logic is run
func NodeConfigFileAndDefaultsToInternalConfig ¶
func NodeConfigFileAndDefaultsToInternalConfig(cfgPath string, defaultversionedcfg *kubeadmapiv1alpha3.JoinConfiguration) (*kubeadmapi.JoinConfiguration, error)
NodeConfigFileAndDefaultsToInternalConfig
func NormalizeKubernetesVersion ¶
func NormalizeKubernetesVersion(cfg *kubeadmapi.ClusterConfiguration) error
NormalizeKubernetesVersion resolves version labels, sets alternative image registry if requested for CI builds, and validates minimal version that kubeadm SetInitDynamicDefaultssupports.
func SetAPIEndpointDynamicDefaults ¶
func SetAPIEndpointDynamicDefaults(cfg *kubeadmapi.APIEndpoint) error
SetAPIEndpointDynamicDefaults checks and sets configuration values for the APIEndpoint object
func SetBootstrapTokensDynamicDefaults ¶
func SetBootstrapTokensDynamicDefaults(cfg *[]kubeadmapi.BootstrapToken) error
SetBootstrapTokensDynamicDefaults checks and sets configuration values for the BootstrapTokens object
func SetClusterDynamicDefaults ¶
func SetClusterDynamicDefaults(cfg *kubeadmapi.ClusterConfiguration, advertiseAddress string, bindPort int32) error
SetClusterDynamicDefaults checks and sets configuration values for the InitConfiguration object
func SetInitDynamicDefaults ¶
func SetInitDynamicDefaults(cfg *kubeadmapi.InitConfiguration) error
SetInitDynamicDefaults checks and sets configuration values for the InitConfiguration object
func SetJoinDynamicDefaults ¶
func SetJoinDynamicDefaults(cfg *kubeadmapi.JoinConfiguration) error
SetJoinDynamicDefaults checks and sets configuration values for the JoinConfiguration object
func SetNodeRegistrationDynamicDefaults ¶
func SetNodeRegistrationDynamicDefaults(cfg *kubeadmapi.NodeRegistrationOptions, masterTaint bool) error
SetNodeRegistrationDynamicDefaults checks and sets configuration values for the NodeRegistration object
func VerifyAPIServerBindAddress ¶
VerifyAPIServerBindAddress can be used to verify if a bind address for the API Server is 0.0.0.0, in which case this address is not valid and should not be used.
Types ¶
This section is empty.