MAQPNADocs

maqpna apply

Validate manifests, then server-side apply them (agents, policies, trust tiers, ...)

Run agents-o json | yaml

Synopsis#

maqpna apply -f FILE|DIR|- [-R] [-n NS] [--dry-run none|server] [--force-conflicts] [--validate true|strict|false]

Description#

Objects are applied with server-side apply (field manager maqpna-cli); the API server runs the CRD schema, CEL rules and admission policies. With --validate (default) the offline checks of maqpna validate run first when this build has them; --validate=strict fails when it does not. Exit 1 when any object fails.

Flags#

FlagTypeDescriptionDefault
-R, --recursiveswitchrecurse into sub-directories of -f directoriesnone
--dry-runstringnone | server (the API server runs admission and validation, nothing is stored)none
-f, --filenamestringmanifest file, directory or - (stdin); repeatablenone
--force-conflictsswitchtake ownership of fields managed by another field managernone
-n, --namespacestringnamespacedefault
--server-sideswitchalways on: maqpna apply uses server-side apply (field manager maqpna-cli)true
--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 apply -f coder.yaml -n team-a
maqpna apply -f manifests/ -R --dry-run server

What happens when you run it#

  • --dry-run: none | server (the API server runs admission and validation, nothing is stored).
  • 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 apply --help.cast

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