Skip to content

Commit

Permalink
only set hostname if useFakeKubelets
Browse files Browse the repository at this point in the history
  • Loading branch information
ishankhare07 committed Oct 6, 2023
1 parent 17b4460 commit 679ea2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controllers/resources/nodes/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func (s *nodeSyncer) translateUpdateBackwards(pNode *corev1.Node, vNode *corev1.
}
}

labels["kubernetes.io/hostname"] = GetNodeHost(vNode.Name)
if s.useFakeKubelets {
labels["kubernetes.io/hostname"] = GetNodeHost(vNode.Name)
}

// Omit those taints for which the vcluster has enforced tolerations defined
if len(s.enforcedTolerations) > 0 && len(translatedSpec.Taints) > 0 {
Expand Down

0 comments on commit 679ea2c

Please sign in to comment.