mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add information about the startupProbe (#1538)
Signed-off-by: vshakirova <vshakirova@mirantis.com>
This commit is contained in:
parent
1e76e8c06c
commit
abd4223675
@ -2664,6 +2664,10 @@ msgstr "Status"
|
|||||||
#~ msgid "Status URI"
|
#~ msgid "Status URI"
|
||||||
#~ msgstr "Status URI"
|
#~ msgstr "Status URI"
|
||||||
|
|
||||||
|
#: src/renderer/components/+workloads-pods/pod-details-container.tsx:140
|
||||||
|
msgid "Startup"
|
||||||
|
msgstr "Startup"
|
||||||
|
|
||||||
#: src/renderer/components/+storage-volume-claims/volume-claim-details.tsx:56
|
#: src/renderer/components/+storage-volume-claims/volume-claim-details.tsx:56
|
||||||
#: src/renderer/components/layout/sidebar.tsx:85
|
#: src/renderer/components/layout/sidebar.tsx:85
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
|
|||||||
@ -2646,6 +2646,10 @@ msgstr ""
|
|||||||
#~ msgid "Status URI"
|
#~ msgid "Status URI"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/renderer/components/+workloads-pods/pod-details-container.tsx:140
|
||||||
|
msgid "Startup"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/renderer/components/+storage-volume-claims/volume-claim-details.tsx:56
|
#: src/renderer/components/+storage-volume-claims/volume-claim-details.tsx:56
|
||||||
#: src/renderer/components/layout/sidebar.tsx:85
|
#: src/renderer/components/layout/sidebar.tsx:85
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
|
|||||||
@ -2664,6 +2664,10 @@ msgstr "Статус"
|
|||||||
#~ msgid "Status URI"
|
#~ msgid "Status URI"
|
||||||
#~ msgstr "Адрес статуса"
|
#~ msgstr "Адрес статуса"
|
||||||
|
|
||||||
|
#: src/renderer/components/+workloads-pods/pod-details-container.tsx:140
|
||||||
|
msgid "Startup"
|
||||||
|
msgstr "Cтарт"
|
||||||
|
|
||||||
#: src/renderer/components/+storage-volume-claims/volume-claim-details.tsx:56
|
#: src/renderer/components/+storage-volume-claims/volume-claim-details.tsx:56
|
||||||
#: src/renderer/components/layout/sidebar.tsx:85
|
#: src/renderer/components/layout/sidebar.tsx:85
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
|
|||||||
@ -46,6 +46,26 @@ export class DeploymentApi extends KubeApi<Deployment> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IContainerProbe {
|
||||||
|
httpGet?: {
|
||||||
|
path?: string;
|
||||||
|
port: number;
|
||||||
|
scheme: string;
|
||||||
|
host?: string;
|
||||||
|
};
|
||||||
|
exec?: {
|
||||||
|
command: string[];
|
||||||
|
};
|
||||||
|
tcpSocket?: {
|
||||||
|
port: number;
|
||||||
|
};
|
||||||
|
initialDelaySeconds?: number;
|
||||||
|
timeoutSeconds?: number;
|
||||||
|
periodSeconds?: number;
|
||||||
|
successThreshold?: number;
|
||||||
|
failureThreshold?: number;
|
||||||
|
}
|
||||||
|
|
||||||
@autobind()
|
@autobind()
|
||||||
export class Deployment extends WorkloadKubeObject {
|
export class Deployment extends WorkloadKubeObject {
|
||||||
static kind = "Deployment";
|
static kind = "Deployment";
|
||||||
@ -89,30 +109,9 @@ export class Deployment extends WorkloadKubeObject {
|
|||||||
name: string;
|
name: string;
|
||||||
mountPath: string;
|
mountPath: string;
|
||||||
}[];
|
}[];
|
||||||
livenessProbe?: {
|
livenessProbe?: IContainerProbe;
|
||||||
httpGet: {
|
readinessProbe?: IContainerProbe;
|
||||||
path: string;
|
startupProbe?: IContainerProbe;
|
||||||
port: number;
|
|
||||||
scheme: string;
|
|
||||||
};
|
|
||||||
initialDelaySeconds: number;
|
|
||||||
timeoutSeconds: number;
|
|
||||||
periodSeconds: number;
|
|
||||||
successThreshold: number;
|
|
||||||
failureThreshold: number;
|
|
||||||
};
|
|
||||||
readinessProbe?: {
|
|
||||||
httpGet: {
|
|
||||||
path: string;
|
|
||||||
port: number;
|
|
||||||
scheme: string;
|
|
||||||
};
|
|
||||||
initialDelaySeconds: number;
|
|
||||||
timeoutSeconds: number;
|
|
||||||
periodSeconds: number;
|
|
||||||
successThreshold: number;
|
|
||||||
failureThreshold: number;
|
|
||||||
};
|
|
||||||
terminationMessagePath: string;
|
terminationMessagePath: string;
|
||||||
terminationMessagePolicy: string;
|
terminationMessagePolicy: string;
|
||||||
imagePullPolicy: string;
|
imagePullPolicy: string;
|
||||||
|
|||||||
@ -112,6 +112,7 @@ export interface IPodContainer {
|
|||||||
}[];
|
}[];
|
||||||
livenessProbe?: IContainerProbe;
|
livenessProbe?: IContainerProbe;
|
||||||
readinessProbe?: IContainerProbe;
|
readinessProbe?: IContainerProbe;
|
||||||
|
startupProbe?: IContainerProbe;
|
||||||
imagePullPolicy: string;
|
imagePullPolicy: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -429,6 +430,10 @@ export class Pod extends WorkloadKubeObject {
|
|||||||
return this.getProbe(container.readinessProbe);
|
return this.getProbe(container.readinessProbe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStartupProbe(container: IPodContainer) {
|
||||||
|
return this.getProbe(container.startupProbe);
|
||||||
|
}
|
||||||
|
|
||||||
getProbe(probeData: IContainerProbe) {
|
getProbe(probeData: IContainerProbe) {
|
||||||
if (!probeData) return [];
|
if (!probeData) return [];
|
||||||
const {
|
const {
|
||||||
|
|||||||
@ -57,6 +57,7 @@ export class PodDetailsContainer extends React.Component<Props> {
|
|||||||
const ready = status ? status.ready : "";
|
const ready = status ? status.ready : "";
|
||||||
const liveness = pod.getLivenessProbe(container);
|
const liveness = pod.getLivenessProbe(container);
|
||||||
const readiness = pod.getReadinessProbe(container);
|
const readiness = pod.getReadinessProbe(container);
|
||||||
|
const startup = pod.getStartupProbe(container);
|
||||||
const isInitContainer = !!pod.getInitContainers().find(c => c.name == name);
|
const isInitContainer = !!pod.getInitContainers().find(c => c.name == name);
|
||||||
const metricTabs = [
|
const metricTabs = [
|
||||||
<Trans key="cpu">CPU</Trans>,
|
<Trans key="cpu">CPU</Trans>,
|
||||||
@ -140,6 +141,15 @@ export class PodDetailsContainer extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
}
|
}
|
||||||
|
{startup.length > 0 &&
|
||||||
|
<DrawerItem name={<Trans>Startup</Trans>} labelsOnly>
|
||||||
|
{
|
||||||
|
startup.map((value, index) => (
|
||||||
|
<Badge key={index} label={value}/>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</DrawerItem>
|
||||||
|
}
|
||||||
{command &&
|
{command &&
|
||||||
<DrawerItem name={<Trans>Command</Trans>}>
|
<DrawerItem name={<Trans>Command</Trans>}>
|
||||||
{command.join(" ")}
|
{command.join(" ")}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user