Skip to main content
The ImportCluster manifest is the declarative entry point for onboarding a cluster into Ankra and describing its stacks. Apply it with the CLI:
The same schema is what Ankra reads from a connected GitOps repository.

Full Example

Top Level

spec.git_repository

Connect a Git repository so stacks are stored and synced from Git. Omit the block entirely for a non-GitOps import. Applying a changed git_repository block repoints the cluster: Ankra reads from the new repository and branch from the next sync on. Any branch works - a cluster is not tied to its repository’s default branch, so one repository with a branch per environment is a supported layout.
Repointing is destructive. Ankra removes resources that are no longer defined in the connected source, so if the new repository or branch does not define a stack the cluster is currently running, that stack is pruned - including any PersistentVolumeClaims it owns.Before repointing, diff the two sources over the cluster’s directory and confirm the new one defines everything you expect to keep:

spec.helm_registries[]

Declare the Helm registries the file’s add-ons depend on, so the repository is self-contained: applying the file connects any registry that is not already present before add-ons deploy. A declaration matching an existing registry (same name, same URL - org-scoped or global) is an idempotent no-op; a declaration whose name is taken by a registry with a different URL fails the apply before anything is written. Credentials are referenced by name and must already exist, so secrets stay out of Git.

spec.stacks[]

Each stack groups related manifests, add-ons, and applications.

Deploy waves

deploy_wave sequences whole stacks: a stack in wave N starts deploying only after every stack in a lower wave finished successfully, and teardown unwinds in reverse wave order. Stacks in the same wave deploy in parallel, and stacks without a deploy_wave stay independent of the ordering entirely - existing clusters keep their current behaviour.
Wave numbers do not need to be contiguous - 1, 5, 20 works and leaves room to slot stacks in later. If a stack in wave N fails, later waves stay blocked until it is fixed or removed. Within a stack, parents still control resource-level order.

Include paths

Instead of inline entries, reference files or folders in the repository. Ankra loads every YAML file found:

spec.stacks[].manifests[]

Raw Kubernetes YAML resources.

spec.stacks[].addons[]

Helm releases.

settings defaults

Sync behaviour maps to ArgoCD and defaults to fully automated. See Add-on Settings for semantics.

spec.stacks[].applications[]

Deployments of Applications created in Ankra.

Parents

parents are the dependency edges that control deployment order: a resource deploys only after all of its parents succeed. Two equivalent syntaxes are accepted:
kind must be manifest or addon, and the parent must be defined somewhere in the same file. Namespace manifests must be parents of everything deployed into that namespace.

Validation

ankra cluster apply validates the file before sending anything: unknown fields, missing parents, and invalid parent kinds are rejected with the offending path. Use --dry-run to validate without applying. ankra cluster validate -f cluster.yaml is the server-side pre-flight gate, built for CI: it runs every rule apply enforces without touching the cluster. That covers structure (duplicate names, missing parents, dependency cycles), chart resolution (registry connected, chart exists, pinned version exists), plaintext-secret detection, and the per-resource field rules - add-on namespaces (Kubernetes DNS label: 1-63 characters, lowercase letters, digits and -, starting and ending with a letter or digit), group names, and empty manifest bodies. Pass --cluster <id> to additionally validate against that cluster’s live resources, exactly as an apply to it would.