k8s_client v0.1.3 K8s.Client.Wait
Waiting functionality for K8s.Client
Link to this section Summary
Functions
Continually perform a GET based operation until a condition is met
Link to this section Types
Link to this type
t()
t()
t() :: %K8s.Client.Wait{
eval: any() | (any() -> any()),
find: [binary()] | (any() -> any()),
processor: (map(), map() -> {:ok, map()} | {:error, binary()}),
sleep: pos_integer(),
timeout: pos_integer(),
timeout_after: NaiveDateTime.t()
}
t() :: %K8s.Client.Wait{ eval: any() | (any() -> any()), find: [binary()] | (any() -> any()), processor: (map(), map() -> {:ok, map()} | {:error, binary()}), sleep: pos_integer(), timeout: pos_integer(), timeout_after: NaiveDateTime.t() }
A wait configuration
Link to this section Functions
Link to this function
until(op, conf, opts)
Continually perform a GET based operation until a condition is met.
Example
Checking the number of job completions:
op = K8s.Client.get("batch/v1", :job, namespace: "default", name: "sleep")
conf = K8s.Conf.from_file("~/.kube/config")
opts = [find: ["status", "succeeded"], eval: 1, timeout: 60]
resp = K8s.Client.Wait.until(op, conf, opts)