MAQPNADocs

maqpna label

Update the labels of resources (kubectl label)

Run agents-o json | yaml

Synopsis#

maqpna label TYPE NAME... | TYPE/NAME... KEY=VALUE... KEY-... [-n NS] [-l SELECTOR | --all] [--overwrite]
              [--list] [--resource-version RV] [--dry-run none|client|server]

Flags#

FlagTypeDescriptionDefault
-A, --all-namespacesswitchall namespacesnone
-R, --recursiveswitchrecurse into sub-directories of -f directoriesnone
--allswitchevery object of the type (in the namespace, or with -A in all)none
--dry-runstringnone | client (nothing is sent) | server (the API server checks the change and stores nothing)none
-f, --filenamestringmanifest file, directory, URL or - (stdin); repeatablenone
--field-selectorstringfield selector evaluated on any field (spec.agentRef=coder,status.phase!=Failed)none
--ignore-not-foundswitcha missing named object is not an errornone
-l, --selectorstringlabel selector (e.g. app=coder,tier!=t0); Kubernetes kindsnone
--listswitchprint the current labelsnone
-n, --namespacestringnamespacedefault
--overwriteswitchreplace existing valuesnone
--resource-versionstringonly change the object at this resource versionnone

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna label ag coder -n team-a owner=platform
maqpna label sess -l maqpna.com/agent=coder -n team-a reviewed=true --overwrite
maqpna label 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 json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)