type kubeletFlagsOpts … // GetNodeNameAndHostname obtains the name for this Node using the following precedence // (from lower to higher): // - actual hostname // - NodeRegistrationOptions.Name (same as "--node-name" passed to "kubeadm init/join") // - "hostname-override" flag in NodeRegistrationOptions.KubeletExtraArgs // It also returns the hostname or an error if getting the hostname failed. func GetNodeNameAndHostname(cfg *kubeadmapi.NodeRegistrationOptions) (string, string, error) { … } // WriteKubeletDynamicEnvFile writes an environment file with dynamic flags to the kubelet. // Used at "kubeadm init" and "kubeadm join" time. func WriteKubeletDynamicEnvFile(cfg *kubeadmapi.ClusterConfiguration, nodeReg *kubeadmapi.NodeRegistrationOptions, registerTaintsUsingFlags bool, kubeletDir string) error { … } // buildKubeletArgsCommon takes a kubeletFlagsOpts object and builds based on that a slice of arguments // that are common to both Linux and Windows func buildKubeletArgsCommon(opts kubeletFlagsOpts) []kubeadmapi.Arg { … } // writeKubeletFlagBytesToDisk writes a byte slice down to disk at the specific location of the kubelet flag overrides file func writeKubeletFlagBytesToDisk(b []byte, kubeletDir string) error { … } // buildKubeletArgs takes a kubeletFlagsOpts object and builds based on that a slice of arguments // that should be given to the local kubelet daemon. func buildKubeletArgs(opts kubeletFlagsOpts) []kubeadmapi.Arg { … }