maqpna diff
Show what apply would change (server-side dry run)
Synopsis#
maqpna diff -f FILE|DIR|- [-R] [-n NS] [--validate true|strict|false]Description#
Prints a unified diff of the live objects against the result of a server-side dry-run apply. Exit status: 0 no differences, 3 differences found, 1 error (kubectl diff uses 1 for differences; maqpna keeps 1 for errors and uses 3, its "mismatch" code).
Flags#
| Flag | Type | Description | Default |
|---|---|---|---|
-R, --recursive | switch | recurse into sub-directories of -f directories | none |
-f, --filename | string | manifest file, directory or - (stdin); repeatable | none |
-n, --namespace | string | namespace | default |
--validate | string | true: run maqpna validate first when available; strict: fail when it is not; false: server-side checks only | true |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna diff -f coder.yaml -n team-a
maqpna diff -f manifests/ -RWhat 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) |
Terminal demo#
This command needs a Kubernetes cluster with MAQPNA installed, so the recording shows its help. Try it against a cluster from Install.