Merge pull request #74277 from neolit123/fix-join-phase

kubeadm/join: expose the KubeConfigPath() method to joinData
pull/564/head
Kubernetes Prow Robot 2019-02-20 07:44:57 -08:00 committed by GitHub
commit b0f6857f92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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 {