Support window nodes for node-shells (#3624)

* Support window nodes for node-shells

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Also check beta.kubernetes/os label

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add comment about linux fallback

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-08 20:11:40 -05:00
1 parent c09a57370e
commit 5eb1b8553d
5 files changed
+47 -24

No files matched your search

+4 -7
View File
@@ -236,13 +236,10 @@ export class Node extends KubeObject {
}
getOperatingSystem(): string {
const label = this.getLabels().find(label => label.startsWith("kubernetes.io/os="));
if (label) {
return label.split("=", 2)[1];
}
return "linux";
return this.metadata?.labels?.["kubernetes.io/os"]
|| this.metadata?.labels?.["beta.kubernetes.io/os"]
|| this.status?.nodeInfo?.operatingSystem
|| "linux";
}
isUnschedulable() {