Merge pull request #84472 from gab-satchi/windows-build-label

Adds Windows build information as a label on the node
This commit is contained in:
Kubernetes Prow Robot
2019-11-13 21:46:19 -08:00
committed by GitHub
8 changed files with 126 additions and 87 deletions

View File

@@ -156,6 +156,7 @@ func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool
v1.LabelInstanceType,
v1.LabelOSStable,
v1.LabelArchStable,
v1.LabelWindowsBuild,
kubeletapis.LabelOS,
kubeletapis.LabelArch,
}
@@ -231,6 +232,14 @@ func (kl *Kubelet) initialNode(ctx context.Context) (*v1.Node, error) {
Unschedulable: !kl.registerSchedulable,
},
}
osLabels, err := getOSSpecificLabels()
if err != nil {
return nil, err
}
for label, value := range osLabels {
node.Labels[label] = value
}
nodeTaints := make([]v1.Taint, 0)
if len(kl.registerWithTaints) > 0 {
taints := make([]v1.Taint, len(kl.registerWithTaints))