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
ec88ec27
Unverified
Commit
ec88ec27
authored
May 14, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75405 from tghartland/node-init-fix
Recheck for cloud taint before initializing nodes in cloud controller
parents
23fb942e
081ec693
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
node_controller.go
pkg/controller/cloud/node_controller.go
+9
-2
No files found.
pkg/controller/cloud/node_controller.go
View file @
ec88ec27
...
...
@@ -248,6 +248,13 @@ func (cnc *CloudNodeController) initializeNode(node *v1.Node) {
return
err
}
cloudTaint
:=
getCloudTaint
(
curNode
.
Spec
.
Taints
)
if
cloudTaint
==
nil
{
// Node object received from event had the cloud taint but was outdated,
// the node has actually already been initialized.
return
nil
}
if
curNode
.
Spec
.
ProviderID
==
""
{
providerID
,
err
:=
cloudprovider
.
GetInstanceProviderID
(
context
.
TODO
(),
cnc
.
cloud
,
types
.
NodeName
(
curNode
.
Name
))
if
err
==
nil
{
...
...
@@ -304,14 +311,14 @@ func (cnc *CloudNodeController) initializeNode(node *v1.Node) {
// After adding, call UpdateNodeAddress to set the CloudProvider provided IPAddresses
// So that users do not see any significant delay in IP addresses being filled into the node
cnc
.
updateNodeAddress
(
curNode
,
instances
)
klog
.
Infof
(
"Successfully initialized node %s with cloud provider"
,
node
.
Name
)
return
nil
})
if
err
!=
nil
{
utilruntime
.
HandleError
(
err
)
return
}
klog
.
Infof
(
"Successfully initialized node %s with cloud provider"
,
node
.
Name
)
}
func
getCloudTaint
(
taints
[]
v1
.
Taint
)
*
v1
.
Taint
{
...
...
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