maqpna patch
Update fields of a resource with a merge or JSON patch (kubectl patch)
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#
| Flag | Type | Description | Default |
|---|---|---|---|
--dry-run | string | none | client (nothing is sent) | server (the API server checks the change and stores nothing) | none |
-n, --namespace | string | namespace | default |
-p, --patch | string | the patch (JSON or YAML) | none |
--patch-file | string | read the patch from FILE | none |
--subresource | string | status: patch the status subresource | none |
--type | string | merge | 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 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) |