MAQPNADocs

maqpna diff

Show what apply would change (server-side dry run)

Run agents-o json | yaml

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#

FlagTypeDescriptionDefault
-R, --recursiveswitchrecurse into sub-directories of -f directoriesnone
-f, --filenamestringmanifest file, directory or - (stdin); repeatablenone
-n, --namespacestringnamespacedefault
--validatestringtrue: run maqpna validate first when available; strict: fail when it is not; false: server-side checks onlytrue

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

Examples#

maqpna diff -f coder.yaml -n team-a
maqpna diff -f manifests/ -R

What happens when you run it#

  • 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)

Terminal demo#

maqpna diff --help.cast

This command needs a Kubernetes cluster with MAQPNA installed, so the recording shows its help. Try it against a cluster from Install.