Install and upgrade flow#
MAQPNA installs with one command, maqpna install, and upgrades with maqpna upgrade. Both drive the MAQPNA Helm chart through the Helm v3 SDK. Because the Helm SDK would more than double the size of the CLI, the lifecycle commands live in a separate executable, the lifecycle plugin maqpna-install. The maqpna CLI lists them in its help and hands them over to the plugin with every argument unchanged.
| Command | What it does | Exit 3 when |
|---|---|---|
maqpna preflight |
Read-only checks of the cluster against the values you would install with | A check fails |
maqpna install |
Applies the CRDs server-side, then installs the release | — |
maqpna upgrade check |
Says whether an upgrade is safe | The upgrade is blocked |
maqpna upgrade |
Applies the new CRDs, then upgrades the release, reusing deployed values | — |
maqpna rollback |
Rolls the release back, never the CRDs | — |
maqpna uninstall |
Removes the release; keeps CRDs, key Secrets and agent namespaces unless --purge |
— |
How the plugin is found#
flowchart TD
C["maqpna install ..."] --> E{"MAQPNA_INSTALL_PLUGIN set?"}
E -- yes --> RUN["run that file"]
E -- no --> B{"maqpna-install next to the maqpna binary<br/>(or next to its symlink target)?"}
B -- yes --> RUN
B -- no --> P{"maqpna-install on PATH?"}
P -- yes --> RUN
P -- no --> M["print how to install the plugin, exit 1"]
RUN --> X["same arguments and global flags,<br/>stdin, stdout, stderr and exit code passed through,<br/>SIGTERM forwarded"]
The plugin is the only plugin the CLI knows; there is no general maqpna-<name> plugin lookup. Separately, the maqpna binary installed as kubectl-maqpna works as a kubectl plugin (kubectl maqpna ...).
Install#
sequenceDiagram
autonumber
participant U as Platform engineer
participant CLI as maqpna
participant PL as maqpna-install
participant R as Chart registry (OCI)
participant K as Kubernetes API
U->>CLI: maqpna install --profile prod -f my-values.yaml
CLI->>PL: exec with the same arguments
PL->>R: pull the release chart<br/>(version = the CLI's version)
PL->>PL: merge values: profile, -f files, --set
PL->>K: release maqpna exists? (refuse: use maqpna upgrade)
PL->>K: plan CRDs (server dry run), stop on blocking changes
PL->>K: server-side apply the 13 CRDs (field manager maqpna)
PL->>K: helm install (create namespace maqpna-system, wait, 10 min timeout)
K-->>PL: release deployed
PL-->>U: release, chart and app versions, CRD plan, notes
- Run preflight first.
maqpna preflightevaluates the same valuesinstallwould use and checks, read-only:chart-renders,release-exists,kube-version(at least 1.29.0),install-permissions(SelfSubjectAccessReviews),agent-sandbox(the upstream CRDs are served),runtimeclass-<name>for every RuntimeClass the values enable,cni-networkpolicy(a CNI that enforces NetworkPolicies),image-registry-allowed,gateway-replicas-state(more than one gateway replica needsstate.backend: postgres),state-dsn-secret,identity-key-secret,attest-sample-verifierandattest-dev-key-secret. - Pick a profile.
--profile dev|prod|sovereign-eumaps tovalues-dev.yaml,values-production.yamlandvalues-sovereign-eu.yaml. The production profile turns on OIDC admin authentication, closed audit mode, Postgres state with three gateway replicas, WORM shipping with signed checkpoints and principal binding. - Resolve the chart. By default the release chart (
oci://<release registry>/charts/maqpna, listed on maqpna.com/download) at the CLI's own version;--chart,--version,--repoand registry credentials (--username,--password, envMAQPNA_CHART_USERNAME,MAQPNA_CHART_PASSWORD) override it. - Apply the CRDs. Helm never upgrades the
crds/directory, so the plugin plans the CRD changes (a server-side dry run with--dry-run), refuses blocking changes, and server-side applies the CRDs itself before Helm runs (skip with--skip-crds). - Install the release.
helm installintomaqpna-system(created by default), waiting for the workloads. - Prerequisites the chart does not install. The upstream agent-sandbox controller (v1.0.4), the RuntimeClass handlers on your nodes (gVisor, Kata), and, for production, PostgreSQL and an identity provider.
Upgrade#
maqpna upgrade checkruns the checksrelease-installed,version-path(fails on a downgrade or a skipped minor version),crd-changes,crd-removed-fields,crd-stored-versions(a stored version the new CRDs no longer serve would orphan objects),render-target(the new chart renders with the deployed values),behaviour-values(values whose meaning changes) andversion-skew(gateway, identity broker, attestation service and operator on the same minor version; the CLI within one minor version).maqpna upgraderequires the release to exist, re-applies the deployed values on top of the new chart's defaults (unless--reset-values), server-side applies the new CRDs and runshelm upgrade.--atomicimplies--waitand rolls back on failure.--dry-runprints the CRD plan and a manifest diff with Secret values redacted.maqpna rollbacknever rolls back CRDs, and refuses when an installed CRD stores a version the target revision does not define (--forceoverrides).maqpna uninstallkeeps the CRDs, the token and identity key Secrets (Helmresource-policy: keep) and agent namespaces unless--purge; it needs--yeswhen not run in a terminal.
Air-gapped install#
flowchart LR
subgraph Online["Connected build host"]
B["maqpna airgap bundle<br/>images, chart, manifests,<br/>SBOMs, SHA256SUMS, signature"]
end
B -- "removable media" --> V
subgraph Offline["Air-gapped site"]
V["maqpna airgap verify DIR<br/>checksums, cosign signature,<br/>all 11 images present"] --> P["maqpna airgap push DIR<br/>--registry registry.site.local"]
P --> I["maqpna install with<br/>airgap.enabled, image.registry<br/>pointing at the mirror"]
end
maqpna airgap bundle(from a source checkout) builds a bundle of the 11 images, the chart, upstream manifests, SBOMs,SHA256SUMSand a cosign signature (--key REFor--keyless).maqpna airgap verify DIRchecks every checksum, rejects path traversal, verifies the signature (offline with--key cosign.pub, or keyless against--certificate-identityand--certificate-oidc-issuerwith--trusted-root), and checks that all 11 images are present.--require-signaturemakes a missing signature fatal.maqpna airgap push DIR --registry REGcopies every image to your registry with skopeo, crane or docker.- Install with
maqpna install, pointingimage.registryat your mirror. Nothing at runtime calls out.
What you see#
maqpna install prints the release line, the CRD plan and the chart notes (format from cmd/maqpna-install/install.go; values illustrative):
release maqpna in maqpna-system: deployed, revision 1, chart maqpna-0.1.1, app 0.1.1
CRDs: 13 create, 0 update, 0 unchanged
create a2apeers.maqpna.com served v1alpha1, storage v1alpha1
create agentrevocations.maqpna.com served v1alpha1, storage v1alpha1
...
maqpna preflight and maqpna upgrade check print checks as a table with a score (format from cmd/internal/cliutil/posture.go):
STATUS CHECK COMPONENT DETAIL
PASS kube-version operator server v1.31.2, need >= 1.29.0 (chart kubeVersion >=1.29)
FAIL gateway-replicas-state state gateway.replicas=3, state.backend=file
fix: set state.backend=postgres or gateway.replicas=1
WARN cni-networkpolicy network no NetworkPolicy-enforcing CNI recognised among kube-system DaemonSets: kube-proxy
fix: agent sandboxes rely on default-deny NetworkPolicies: use Calico, Cilium or your cloud's network policy engine
score 72/100: 1 fail, 1 warn, 11 pass, 0 info, 0 skip, 0 accepted
See maqpna preflight, maqpna install, maqpna upgrade, maqpna upgrade check, maqpna rollback, maqpna uninstall and maqpna airgap.
Failure modes#
| Failure | Effect |
|---|---|
| Plugin not found | The CLI prints how to install maqpna-install and exits 1 |
| Blocking CRD change | Install or upgrade stops before Helm runs; nothing is changed |
| Workloads not ready within the timeout | Helm reports the release as failed; --atomic rolls an upgrade back |
| Skipped minor version | upgrade check fails version-path; upgrade one minor version at a time |