import { Duration } from './duration'; /** * (experimental) Probe options. * * @experimental */ export interface ProbeOptions { /** * (experimental) Minimum consecutive failures for the probe to be considered failed after having succeeded. * * Defaults to 3. Minimum value is 1. * * @default 3 * @experimental */ readonly failureThreshold?: number; /** * (experimental) Number of seconds after the container has started before liveness probes are initiated. * * @default - immediate * @see https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes * @experimental */ readonly initialDelaySeconds?: Duration; /** * (experimental) How often (in seconds) to perform the probe. * * Default to 10 seconds. Minimum value is 1. * * @default Duration.seconds(10) Minimum value is 1. * @experimental */ readonly periodSeconds?: Duration; /** * (experimental) Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. * * Must be 1 for liveness and startup. Minimum value is 1. * * @default 1 Must be 1 for liveness and startup. Minimum value is 1. * @experimental */ readonly successThreshold?: number; /** * (experimental) Number of seconds after which the probe times out. * * Defaults to 1 second. Minimum value is 1. * * @default Duration.seconds(1) * @see https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes * @experimental */ readonly timeoutSeconds?: Duration; } /** * (experimental) Options for `Probe.fromHttpGet()`. * * @experimental */ export interface HttpGetProbeOptions extends ProbeOptions { /** * (experimental) The TCP port to use when sending the GET request. * * @default - defaults to `container.port`. * @experimental */ readonly port?: number; } /** * (experimental) Options for `Probe.fromCommand()`. * * @experimental */ export interface CommandProbeOptions extends ProbeOptions { } /** * (experimental) Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. * * @experimental */ export declare abstract class Probe { /** * (experimental) Defines a probe based on an HTTP GET request to the IP address of the container. * * @param path The URL path to hit. * @param options Options. * @experimental */ static fromHttpGet(path: string, options?: HttpGetProbeOptions): Probe; /** * (experimental) Defines a probe based on a command which is executed within the container. * * @param command The command to execute. * @param options Options. * @experimental */ static fromCommand(command: string[], options?: CommandProbeOptions): Probe; }