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