Show runtimeClassName in pods view

Signed-off-by: Piotr Roszatycki <piotr.roszatycki@gmail.com>
This commit is contained in:
Piotr Roszatycki committed 2022-10-02 21:25:05 +02:00
1 parent e8f691ab0e
commit c43ff22eb6
2 files changed
+16 -5

No files matched your search

+4
View File
@@ -714,6 +714,10 @@ export class Pod extends KubeObject<
return this.spec?.priorityClassName || ""; return this.spec?.priorityClassName || "";
} }
getRuntimeClassName() {
return this.spec?.runtimeClassName || "";
}
getServiceAccountName() { getServiceAccountName() {
return this.spec?.serviceAccountName || ""; return this.spec?.serviceAccountName || "";
} }
@@ -119,12 +119,15 @@ export class PodDetails extends React.Component<PodDetailsProps> {
<DrawerItem name="Service Account"> <DrawerItem name="Service Account">
{pod.getServiceAccountName()} {pod.getServiceAccountName()}
</DrawerItem> </DrawerItem>
<DrawerItem name="Priority Class"> <DrawerItem name="Priority Class" hidden={pod.getPriorityClassName() === ""}>
{pod.getPriorityClassName()} {pod.getPriorityClassName()}
</DrawerItem> </DrawerItem>
<DrawerItem name="QoS Class"> <DrawerItem name="QoS Class">
{pod.getQosClass()} {pod.getQosClass()}
</DrawerItem> </DrawerItem>
<DrawerItem name="Runtime Class" hidden={pod.getRuntimeClassName() === ""}>
{pod.getRuntimeClassName()}
</DrawerItem>
<DrawerItem <DrawerItem
name="Conditions" name="Conditions"
@@ -155,7 +158,8 @@ export class PodDetails extends React.Component<PodDetailsProps> {
<PodDetailsSecrets pod={pod} /> <PodDetailsSecrets pod={pod} />
</DrawerItem> </DrawerItem>
{initContainers.length > 0 && ( {
initContainers.length > 0 && (
<> <>
<DrawerTitle>Init Containers</DrawerTitle> <DrawerTitle>Init Containers</DrawerTitle>
{initContainers.map(container => ( {initContainers.map(container => (
@@ -166,17 +170,20 @@ export class PodDetails extends React.Component<PodDetailsProps> {
/> />
))} ))}
</> </>
)} )
}
<DrawerTitle>Containers</DrawerTitle> <DrawerTitle>Containers</DrawerTitle>
{containers.map(container => ( {
containers.map(container => (
<PodDetailsContainer <PodDetailsContainer
key={container.name} key={container.name}
pod={pod} pod={pod}
container={container} container={container}
metrics={getItemMetrics(toJS(this.containerMetrics), container.name)} metrics={getItemMetrics(toJS(this.containerMetrics), container.name)}
/> />
))} ))
}
<PodVolumes pod={pod} /> <PodVolumes pod={pod} />
</div > </div >