Skip to main content
Version: v0.13

probe

Schema Probe

Probe describes a health check to be performed against a container to determine whether it is
alive or ready to receive traffic. There are three probe types: readiness, liveness, and startup.

Attributes

nametypedescriptiondefault value
failureThresholdintMinimum consecutive failures for the probe to be considered failed after having succeeded.
initialDelaySecondsintThe number of seconds before health checking is activated.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSecondsintHow often (in seconds) to perform the probe.
probeHandler requiredExecHttpTcp
successThresholdintMinimum consecutive successes for the probe to be considered successful after having failed.
terminationGracePeriodintDuration in seconds before terminate gracefully upon probe failure.
timeoutSecondsintThe number of seconds after which the probe times out.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

Examples

import kam.workload.container.probe as p

probe = p.Probe {
probeHandler: p.Http {
path: "/healthz"
}
initialDelaySeconds: 10
}

Schema Exec

Exec describes a "run in container" action.

Attributes

nametypedescriptiondefault value
command required[str]The command line to execute inside the container.

Examples

import kam.workload.container.probe as p

execProbe = p.Exec {
command: ["probe.sh"]
}

Schema Http

Http describes an action based on HTTP Get requests.

Attributes

nametypedescriptiondefault value
headers{str:str}Collection of custom headers to set in the request
url requiredstrThe full qualified url to send HTTP requests.

Examples

import kam.workload.container.probe as p

httpProbe = p.Http {
url: "http://localhost:80"
headers: {
"X-HEADER": "VALUE"
}
}

Schema Tcp

Tcp describes an action based on opening a socket.

Attributes

nametypedescriptiondefault value
url requiredstrThe full qualified url to open a socket.

Examples

import kam.workload.container.probe as p

tcpProbe = p.Tcp {
url: "tcp://localhost:1234"
}