Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
82481fad
Unverified
Commit
82481fad
authored
Mar 20, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Mar 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75489 from neolit123/automated-cherry-pick-of-#75487-origin-release-1.14
Automated cherry pick of #75487: Restore machine readability to the print-join-command output
parents
5052da0e
6af50b95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
token.go
cmd/kubeadm/app/cmd/token.go
+3
-1
No files found.
cmd/kubeadm/app/cmd/token.go
View file @
82481fad
...
@@ -225,7 +225,7 @@ func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, c
...
@@ -225,7 +225,7 @@ func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, c
return
err
return
err
}
}
// if --print-join-command was specified, print
th
e full `kubeadm join` command
// if --print-join-command was specified, print
a machine-readabl
e full `kubeadm join` command
// otherwise, just print the token
// otherwise, just print the token
if
printJoinCommand
{
if
printJoinCommand
{
skipTokenPrint
:=
false
skipTokenPrint
:=
false
...
@@ -233,6 +233,8 @@ func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, c
...
@@ -233,6 +233,8 @@ func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, c
if
err
!=
nil
{
if
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"failed to get join command"
)
return
errors
.
Wrap
(
err
,
"failed to get join command"
)
}
}
joinCommand
=
strings
.
ReplaceAll
(
joinCommand
,
"
\\\n
"
,
""
)
joinCommand
=
strings
.
ReplaceAll
(
joinCommand
,
"
\t
"
,
""
)
fmt
.
Fprintln
(
out
,
joinCommand
)
fmt
.
Fprintln
(
out
,
joinCommand
)
}
else
{
}
else
{
fmt
.
Fprintln
(
out
,
internalcfg
.
BootstrapTokens
[
0
]
.
Token
.
String
())
fmt
.
Fprintln
(
out
,
internalcfg
.
BootstrapTokens
[
0
]
.
Token
.
String
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment