MAQPNADocs

maqpna patch

Update fields of a resource with a merge or JSON patch (kubectl patch)

Run agents-o json | yaml

Synopsis#

maqpna patch TYPE NAME | TYPE/NAME (-p PATCH | --patch-file F) [--type merge|json] [-n NS]
             [--subresource status] [--dry-run none|client|server]

Description#

The MAQPNA kinds are custom resources: the API server takes merge (the default here) and JSON patches, not strategic-merge patches.

Flags#

FlagTypeDescriptionDefault
--dry-runstringnone | client (nothing is sent) | server (the API server checks the change and stores nothing)none
-n, --namespacestringnamespacedefault
-p, --patchstringthe patch (JSON or YAML)none
--patch-filestringread the patch from FILEnone
--subresourcestringstatus: patch the status subresourcenone
--typestringmerge | json (strategic is not supported by custom resources)merge

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

Examples#

maqpna patch tt t1 -p '{"spec":{"warmPoolSize":3}}'
maqpna patch ag/coder -n team-a --type json -p '[{"op":"replace","path":"/spec/policyRef","value":"strict"}]'

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)