Skip to content

Commit

Permalink
Remove not existing labels check
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Schmidt committed Jun 8, 2017
1 parent 1b9c444 commit 5a1587f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions pkg/kubelet/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ go_test(
"//pkg/apis/componentconfig:go_default_library",
"//pkg/capabilities:go_default_library",
"//pkg/client/clientset_generated/clientset/fake:go_default_library",
"//pkg/kubelet/apis:go_default_library",
"//pkg/kubelet/cadvisor/testing:go_default_library",
"//pkg/kubelet/cm:go_default_library",
"//pkg/kubelet/config:go_default_library",
Expand Down
7 changes: 1 addition & 6 deletions pkg/kubelet/kubelet_node_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (kl *Kubelet) tryRegisterWithApiServer(node *v1.Node) bool {
return false
}

//updateDefaultLabels will set the default labels on the node
// updateDefaultLabels will set the default labels on the node
func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool {
defaultLabels := []string{
kubeletapis.LabelHostname,
Expand All @@ -170,11 +170,6 @@ func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool
kubeletapis.LabelArch,
}

if existingNode.Labels == nil {
existingNode.Labels = initialNode.Labels
return true
}

var needsUpdate bool = false
//Set default labels but make sure to not set labels with empty values
for _, label := range defaultLabels {
Expand Down

0 comments on commit 5a1587f

Please sign in to comment.