Add information about the startupProbe (#1538)

Signed-off-by: vshakirova <vshakirova@mirantis.com>
This commit is contained in:
Violetta authored and GitHub committed 2020-12-13 19:08:26 +02:00
1 parent 1e76e8c06c
commit abd4223675
6 files changed
+50 -24

No files matched your search

+23 -24
View File
@@ -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()
export class Deployment extends WorkloadKubeObject {
static kind = "Deployment";
@@ -89,30 +109,9 @@ export class Deployment extends WorkloadKubeObject {
name: string;
mountPath: string;
}[];
livenessProbe?: {
httpGet: {
path: string;
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;
};
livenessProbe?: IContainerProbe;
readinessProbe?: IContainerProbe;
startupProbe?: IContainerProbe;
terminationMessagePath: string;
terminationMessagePolicy: string;
imagePullPolicy: string;
+5
View File
@@ -112,6 +112,7 @@ export interface IPodContainer {
}[];
livenessProbe?: IContainerProbe;
readinessProbe?: IContainerProbe;
startupProbe?: IContainerProbe;
imagePullPolicy: string;
}
@@ -429,6 +430,10 @@ export class Pod extends WorkloadKubeObject {
return this.getProbe(container.readinessProbe);
}
getStartupProbe(container: IPodContainer) {
return this.getProbe(container.startupProbe);
}
getProbe(probeData: IContainerProbe) {
if (!probeData) return [];
const {
@@ -57,6 +57,7 @@ export class PodDetailsContainer extends React.Component<Props> {
const ready = status ? status.ready : "";
const liveness = pod.getLivenessProbe(container);
const readiness = pod.getReadinessProbe(container);
const startup = pod.getStartupProbe(container);
const isInitContainer = !!pod.getInitContainers().find(c => c.name == name);
const metricTabs = [
<Trans key="cpu">CPU</Trans>,
@@ -140,6 +141,15 @@ export class PodDetailsContainer extends React.Component<Props> {
}
</DrawerItem>
}
{startup.length > 0 &&
<DrawerItem name={<Trans>Startup</Trans>} labelsOnly>
{
startup.map((value, index) => (
<Badge key={index} label={value}/>
))
}
</DrawerItem>
}
{command &&
<DrawerItem name={<Trans>Command</Trans>}>
{command.join(" ")}