mirror of https://github.com/k3s-io/k3s
Merge pull request #74277 from neolit123/fix-join-phase
kubeadm/join: expose the KubeConfigPath() method to joinDatapull/564/head
commit
b0f6857f92
|
@ -173,7 +173,7 @@ func NewCmdJoin(out io.Writer, joinOptions *joinOptions) *cobra.Command {
|
|||
}
|
||||
|
||||
ctx := map[string]string{
|
||||
"KubeConfigPath": kubeadmconstants.GetAdminKubeConfigPath(),
|
||||
"KubeConfigPath": data.KubeConfigPath(),
|
||||
"etcdMessage": etcdMessage,
|
||||
}
|
||||
joinControPlaneDoneTemp.Execute(data.outputWriter, ctx)
|
||||
|
@ -380,6 +380,11 @@ func (j *joinData) Cfg() *kubeadmapi.JoinConfiguration {
|
|||
return j.cfg
|
||||
}
|
||||
|
||||
// KubeConfigPath returns the default kubeconfig path.
|
||||
func (j *joinData) KubeConfigPath() string {
|
||||
return kubeadmconstants.GetAdminKubeConfigPath()
|
||||
}
|
||||
|
||||
// TLSBootstrapCfg returns the cluster-info (kubeconfig).
|
||||
func (j *joinData) TLSBootstrapCfg() (*clientcmdapi.Config, error) {
|
||||
if j.tlsBootstrapCfg != nil {
|
||||
|
|
Loading…
Reference in New Issue