Skip to content

Commit

Permalink
kubeadm: improve init token logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
pires committed Jan 17, 2017
1 parent 2e8df3b commit 6b5d803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/kubeadm/app/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ func (i *Init) Run(out io.Writer) error {
// Validate token if any, otherwise generate
if i.cfg.Discovery.Token != nil {
if i.cfg.Discovery.Token.ID != "" && i.cfg.Discovery.Token.Secret != "" {
fmt.Printf("[token-discovery] A token has been provided, validating [%+v]\n", i.cfg.Discovery.Token)
fmt.Printf("[token-discovery] A token has been provided, validating [%s]\n", kubeadmutil.BearerToken(i.cfg.Discovery.Token))
if valid, err := kubeadmutil.ValidateToken(i.cfg.Discovery.Token); valid == false {
return err
}
} else {
fmt.Printf("[token-discovery] A token has not been provided, generating one\n")
fmt.Println("[token-discovery] A token has not been provided, generating one")
if err := kubeadmutil.GenerateToken(i.cfg.Discovery.Token); err != nil {
return err
}
Expand Down

0 comments on commit 6b5d803

Please sign in to comment.