UNPKG

@topgroup/diginext

Version:

A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.

31 lines 1.2 kB
import type { KubePod } from "../../../interfaces/KubePod"; export declare class DeploymentReadinessChecker { private readonly context; private readonly namespace; private readonly appName; private readonly appVersion; private readonly onUpdate?; constructor(context: string, namespace: string, appName: string, appVersion: string, onUpdate?: (msg: string) => void); checkPodHealth(pods: KubePod[]): Promise<{ totalPods: number; crashedPods: number; creatingPods: number; runningPods: number; isHealthy: boolean; }>; getPods(): Promise<KubePod[]>; /** * Wait until no creating pods every `interval` seconds (Max wait time is 5 minutes) * @param interval - Interval time in seconds * @param maxWaitTime - Max wait time in seconds */ waitUntilNoCreatingPods(interval?: number, maxWaitTime?: number): Promise<void>; /** * Wait until at least one new pod is running */ waitUntilAtLeastOnePodIsRunning(): Promise<void>; isDeploymentReady(requiredReplicas: number, options?: { skipCrashedPods?: boolean; }): Promise<boolean>; } //# sourceMappingURL=deploy-checker.d.ts.map