maqpna annotate
Update the annotations of resources (kubectl annotate)
Synopsis#
maqpna annotate TYPE NAME... | TYPE/NAME... KEY=VALUE... KEY-... [-n NS] [-l SELECTOR | --all] [--overwrite]
[--list] [--resource-version RV] [--dry-run none|client|server]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 |
--dry-run | string | none | client (nothing is sent) | server (the API server checks the change and stores nothing) | 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 |
--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 |
--list | switch | print the current annotations | none |
-n, --namespace | string | namespace | default |
--overwrite | switch | replace existing values | none |
--resource-version | string | only change the object at this resource version | none |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna annotate ag coder -n team-a owner=platform
maqpna annotate sess -l maqpna.com/agent=coder -n team-a reviewed=true --overwrite
maqpna annotate tp/coder-policy -n team-a owner-What happens when you run it#
--dry-run: none | client (nothing is sent) | server (the API server checks the change and stores nothing).- 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) |