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
125cb7b1
Unverified
Commit
125cb7b1
authored
Oct 18, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69846 from andrewrynhard/fix-kubeadm-join-taints
kubeadm: Fix node join taints
parents
c30f5269
197fd02d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
join.go
cmd/kubeadm/app/cmd/join.go
+8
-7
No files found.
cmd/kubeadm/app/cmd/join.go
View file @
125cb7b1
...
@@ -68,7 +68,7 @@ var (
...
@@ -68,7 +68,7 @@ var (
`
)
`
)
notReadyToJoinControPlaneTemp
=
template
.
Must
(
template
.
New
(
"join"
)
.
Parse
(
dedent
.
Dedent
(
`
notReadyToJoinControPlaneTemp
=
template
.
Must
(
template
.
New
(
"join"
)
.
Parse
(
dedent
.
Dedent
(
`
One or more conditions for hosting a new control plane instance is not satisfied.
One or more conditions for hosting a new control plane instance is not satisfied.
{{.Error}}
{{.Error}}
...
@@ -81,7 +81,7 @@ var (
...
@@ -81,7 +81,7 @@ var (
joinControPlaneDoneTemp
=
template
.
Must
(
template
.
New
(
"join"
)
.
Parse
(
dedent
.
Dedent
(
`
joinControPlaneDoneTemp
=
template
.
Must
(
template
.
New
(
"join"
)
.
Parse
(
dedent
.
Dedent
(
`
This node has joined the cluster and a new control plane instance was created:
This node has joined the cluster and a new control plane instance was created:
* Certificate signing request was sent to apiserver and approval was received.
* Certificate signing request was sent to apiserver and approval was received.
* The Kubelet was informed of the new secure connection details.
* The Kubelet was informed of the new secure connection details.
* Master label and taint were applied to the new node.
* Master label and taint were applied to the new node.
...
@@ -94,7 +94,7 @@ var (
...
@@ -94,7 +94,7 @@ var (
sudo chown $(id -u):$(id -g) $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Run 'kubectl get nodes' to see this node join the cluster.
Run 'kubectl get nodes' to see this node join the cluster.
`
)))
`
)))
joinLongDescription
=
dedent
.
Dedent
(
`
joinLongDescription
=
dedent
.
Dedent
(
`
...
@@ -513,10 +513,11 @@ func (j *Join) BootstrapKubelet(tlsBootstrapCfg *clientcmdapi.Config) error {
...
@@ -513,10 +513,11 @@ func (j *Join) BootstrapKubelet(tlsBootstrapCfg *clientcmdapi.Config) error {
return
err
return
err
}
}
// Write env file with flags for the kubelet to use. We do not need to write the --register-with-taints for the master,
// Write env file with flags for the kubelet to use. We only want to
// as we handle that ourselves in the markmaster phase
// register the joining node with the specified taints if the node
// TODO: Maybe we want to do that some time in the future, in order to remove some logic from the markmaster phase?
// is not a master. The markmaster phase will register the taints otherwise.
if
err
:=
kubeletphase
.
WriteKubeletDynamicEnvFile
(
&
j
.
cfg
.
NodeRegistration
,
j
.
cfg
.
FeatureGates
,
false
,
kubeadmconstants
.
KubeletRunDirectory
);
err
!=
nil
{
registerTaintsUsingFlags
:=
!
j
.
cfg
.
ControlPlane
if
err
:=
kubeletphase
.
WriteKubeletDynamicEnvFile
(
&
j
.
cfg
.
NodeRegistration
,
j
.
cfg
.
FeatureGates
,
registerTaintsUsingFlags
,
kubeadmconstants
.
KubeletRunDirectory
);
err
!=
nil
{
return
err
return
err
}
}
...
...
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