Fix pod shell error if no access to nodes (#275)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-04-19 17:48:52 +03:00
1 parent ac552087d5
commit 07e2653f80
2 files changed
+8 -2

No files matched your search

@@ -411,6 +411,13 @@ export class Pod extends WorkloadKubeObject {
getNodeName() {
return this.spec?.nodeName
}
getSelectedNodeOs() {
if (!this.spec.nodeSelector) return
if (!this.spec.nodeSelector["kubernetes.io/os"]) return
return this.spec.nodeSelector["kubernetes.io/os"]
}
}
export const podsApi = new PodsApi({