Architecture
The IaCStack is a persistent declaration in the Kubernetes API. IaC Stack Controller reconciles it and delegates each execution to a registered Argo WorkflowTemplate. The same cluster can use multiple workflow aliases with different pipelines and permissions.
Solid arrows show intent and execution. Dashed arrows show the result returning through Argo and the controller updating the stack status. The Argo adapter is part of the controller, not a separately deployed service.
Separation of responsibilities
| Component | Responsibility |
|---|---|
Kubernetes API and IaCStack | Store desired source revision, inputs, workflow alias, lifecycle policy, and status. GitOps can deliver the manifest. |
| IaC Stack Controller | Evaluate dependencies, suspension, retries and drift schedules. Coordinate an active execution, validate authorization and report status. |
| Execution contract and Argo adapter | Transport intent and correlate resolved source, target binding, progress, authorization and results with the correct attempt. |
| Argo Workflows | Orchestrate the selected WorkflowTemplate, its task Pods, outputs and approval gates. |
| Workflow and runner | Resolve source, target, identity, and backend. Validate, plan, apply governance, execute, and verify the result. |
| Terraform or OpenTofu and backend | Compute and apply the change. Maintain state and use the backend locking supported by the workflow. |
From declaration to apply
- The reconciler observes a new generation, drift schedule or eligible retry and resolves the workflow alias.
- The adapter submits the intent to Argo. The workflow reports the effective source revision and target binding.
- The workflow builds a plan and makes the policy or approval decision. For an authorized workflow, it requests a grant for the current attempt and claims it immediately before apply.
- The workflow verifies the outcome. The controller records the result and evaluates the next lifecycle event.
The approved plan belongs to the workflow. Store it with restricted access, check its integrity and reject stale approval when an intent changes. One active attempt per stack is a controller guarantee. Protect backend state separately and assign one writer per state target.
Deployment boundaries
Argo Workflows is installed in its own Helm release. Install the controller separately. A workflow may run in a dedicated namespace watched by Argo, using a ServiceAccount scoped to its target and state. The base controller image and a workflow runner image are distinct artifacts. The WorkflowTemplate decides which image each step uses.
How it works · Operations · Execution reference · Configure workflows in Argo