var joinWorkerNodeDoneMsg … var joinControlPlaneDoneTemp … var joinLongDescription … type joinOptions … var _ … type joinData … // newCmdJoin returns "kubeadm join" command. // NB. joinOptions is exposed as parameter for allowing unit testing of // the newJoinData method, that implements all the command options validation logic func newCmdJoin(out io.Writer, joinOptions *joinOptions) *cobra.Command { … } // addJoinConfigFlags adds join flags bound to the config to the specified flagset func addJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1.JoinConfiguration) { … } // addJoinOtherFlags adds join flags that are not bound to a configuration file to the given flagset func addJoinOtherFlags(flagSet *flag.FlagSet, joinOptions *joinOptions) { … } // newJoinOptions returns a struct ready for being used for creating cmd join flags. func newJoinOptions() *joinOptions { … } // newJoinData returns a new joinData struct to be used for the execution of the kubeadm join workflow. // This func takes care of validating joinOptions passed to the command, and then it converts // options into the internal JoinConfiguration type that is used as input all the phases in the kubeadm join workflow func newJoinData(cmd *cobra.Command, args []string, opt *joinOptions, out io.Writer, adminKubeConfigPath string) (*joinData, error) { … } // CertificateKey returns the key used to encrypt the certs. func (j *joinData) CertificateKey() string { … } // Cfg returns the JoinConfiguration. func (j *joinData) Cfg() *kubeadmapi.JoinConfiguration { … } // DryRun returns the DryRun flag. func (j *joinData) DryRun() bool { … } // KubeConfigDir returns the path of the Kubernetes configuration folder or the temporary folder path in case of DryRun. func (j *joinData) KubeConfigDir() string { … } // KubeletDir returns the path of the kubelet configuration folder or the temporary folder in case of DryRun. func (j *joinData) KubeletDir() string { … } // ManifestDir returns the path where manifest should be stored or the temporary folder path in case of DryRun. func (j *joinData) ManifestDir() string { … } // CertificateWriteDir returns the path where certs should be stored or the temporary folder path in case of DryRun. func (j *joinData) CertificateWriteDir() string { … } // TLSBootstrapCfg returns the cluster-info (kubeconfig). func (j *joinData) TLSBootstrapCfg() (*clientcmdapi.Config, error) { … } // InitCfg returns the InitConfiguration. func (j *joinData) InitCfg() (*kubeadmapi.InitConfiguration, error) { … } // Client returns the Client for accessing the cluster with the identity defined in admin.conf. func (j *joinData) Client() (clientset.Interface, error) { … } // IgnorePreflightErrors returns the list of preflight errors to ignore. func (j *joinData) IgnorePreflightErrors() sets.Set[string] { … } // OutputWriter returns the io.Writer used to write messages such as the "join done" message. func (j *joinData) OutputWriter() io.Writer { … } // PatchesDir returns the folder where patches for components are stored func (j *joinData) PatchesDir() string { … } // fetchInitConfigurationFromJoinConfiguration retrieves the init configuration from a join configuration, performing the discovery func fetchInitConfigurationFromJoinConfiguration(cfg *kubeadmapi.JoinConfiguration, client clientset.Interface, tlsBootstrapCfg *clientcmdapi.Config) (*kubeadmapi.InitConfiguration, error) { … } // fetchInitConfiguration reads the cluster configuration from the kubeadm-admin configMap func fetchInitConfiguration(client clientset.Interface) (*kubeadmapi.InitConfiguration, error) { … }