Node kernel version is not necessary

Signed-off-by: Piotr Roszatycki <piotr.roszatycki@gmail.com>
This commit is contained in:
Piotr Roszatycki committed 2023-10-23 11:12:39 +02:00
1 parent 83b2ce6afc
commit 0a83a9687a
2 files changed
+1 -10

No files matched your search

@@ -99,7 +99,6 @@ export class NodeShellSession extends ShellSession {
const nodeOs = node.getOperatingSystem();
const nodeOsImage = node.getOperatingSystemImage();
const nodeKernelVersion = node.getKernelVersion();
let image: string;
let command: string[];
@@ -125,11 +124,7 @@ export class NodeShellSession extends ShellSession {
};
break;
case "windows":
if (nodeKernelVersion) {
image = nodeShellImage || initialNodeShellWindowsImage;
} else {
throw new Error(`No status with kernel version for node ${this.nodeName} found`);
}
image = nodeShellImage || initialNodeShellWindowsImage;
command = ["cmd.exe"];
args = ["/c", "%CONTAINER_SANDBOX_MOUNT_POINT%\\Program Files\\PowerShell\\latest\\pwsh.exe", "-nol", "-wd", "C:\\"];
securityContext = {
@@ -251,10 +251,6 @@ export class Node extends KubeObject<ClusterScopedMetadata, NodeStatus, NodeSpec
return this.status?.nodeInfo?.osImage;
}
getKernelVersion(): string | undefined {
return this.status?.nodeInfo?.kernelVersion;
}
isUnschedulable() {
return this.spec.unschedulable;
}