maqpna wait
Wait for a condition on resources (kubectl wait)
Synopsis#
maqpna wait TYPE NAME... | TYPE/NAME... | TYPE (-l SELECTOR | --all) [-n NS]
--for condition=TYPE[=STATUS] | --for delete | --for create | --for jsonpath='{.status.phase}'=VALUE [--timeout 30s]Flags#
| Flag | Type | Description | Default |
|---|---|---|---|
-A, --all-namespaces | switch | all namespaces | none |
-R, --recursive | switch | recurse into sub-directories of -f directories | none |
--all | switch | every object of the type (in the namespace, or with -A in all) | none |
-f, --filename | string | manifest file, directory, URL or - (stdin); repeatable | none |
--field-selector | string | field selector evaluated on any field (spec.agentRef=coder,status.phase!=Failed) | none |
--for | string | condition=TYPE[=STATUS] | delete | create | jsonpath=PATH[=VALUE] | none |
--ignore-not-found | switch | a missing named object is not an error | none |
-l, --selector | string | label selector (e.g. app=coder,tier!=t0); Kubernetes kinds | none |
-n, --namespace | string | namespace | default |
--timeout | duration | give up after this long (exit 1); 0 checks once | 30s |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna wait --for condition=Ready ag/coder -n team-a
maqpna wait --for jsonpath='{.status.phase}'=Running sess/coder-x1 -n team-a --timeout 5m
maqpna wait --for delete sess -l maqpna.com/agent=coder -n team-aWhat happens when you run it#
- Prints a table by default;
-o jsonor-o yamlprint the data, and--jq EXPRfilters the JSON.
Exit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | error (the message says what failed, with a hint when there is one) |
2 | usage error: unknown flag, missing argument or bad value; the synopsis is printed |
3 | a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command) |