diff --git a/dashboard/client/api/endpoints/pods.api.ts b/dashboard/client/api/endpoints/pods.api.ts index de0f6e81f5..cb24a74098 100644 --- a/dashboard/client/api/endpoints/pods.api.ts +++ b/dashboard/client/api/endpoints/pods.api.ts @@ -171,6 +171,9 @@ export class Pod extends WorkloadKubeObject { medium?: string; sizeLimit?: string; }; + configMap: { + name: string; + } secret: { secretName: string; defaultMode: number; diff --git a/dashboard/client/components/+workloads-pods/pod-details.tsx b/dashboard/client/components/+workloads-pods/pod-details.tsx index ec406ce0d0..073b890efe 100644 --- a/dashboard/client/components/+workloads-pods/pod-details.tsx +++ b/dashboard/client/components/+workloads-pods/pod-details.tsx @@ -6,7 +6,7 @@ import { disposeOnUnmount, observer } from "mobx-react"; import { Link } from "react-router-dom"; import { autorun, observable, reaction, toJS } from "mobx"; import { Trans } from "@lingui/macro"; -import { IPodMetrics, nodesApi, Pod, podsApi, pvcApi } from "../../api/endpoints"; +import { IPodMetrics, nodesApi, Pod, podsApi, pvcApi, configMapApi } from "../../api/endpoints"; import { DrawerItem, DrawerTitle } from "../drawer"; import { Badge } from "../badge"; import { autobind, cssNames, interval } from "../../utils"; @@ -176,6 +176,7 @@ export class PodDetails extends React.Component { Volumes}/> {volumes.map(volume => { const claimName = volume.persistentVolumeClaim ? volume.persistentVolumeClaim.claimName : null; + const configMap = volume.configMap ? volume.configMap.name : null; const type = Object.keys(volume)[1] return ( @@ -187,6 +188,20 @@ export class PodDetails extends React.Component { Type}> {type} + { type == "configMap" && ( +
+ {configMap && ( + Name}> + {configMap} + + + )} +
+ )} { type === "emptyDir" && (
{ volume.emptyDir.medium && ( @@ -226,4 +241,4 @@ export class PodDetails extends React.Component { apiManager.registerViews(podsApi, { Details: PodDetails -}) \ No newline at end of file +})