Architecture

Understand intent, orchestration, execution, and state ownership.

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.

Architecture from Kubernetes intent through the controller, Argo Workflows and Terraform or OpenTofu

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

ComponentResponsibility
Kubernetes API and IaCStackStore desired source revision, inputs, workflow alias, lifecycle policy, and status. GitOps can deliver the manifest.
IaC Stack ControllerEvaluate dependencies, suspension, retries and drift schedules. Coordinate an active execution, validate authorization and report status.
Execution contract and Argo adapterTransport intent and correlate resolved source, target binding, progress, authorization and results with the correct attempt.
Argo WorkflowsOrchestrate the selected WorkflowTemplate, its task Pods, outputs and approval gates.
Workflow and runnerResolve source, target, identity, and backend. Validate, plan, apply governance, execute, and verify the result.
Terraform or OpenTofu and backendCompute and apply the change. Maintain state and use the backend locking supported by the workflow.

From declaration to apply

  1. The reconciler observes a new generation, drift schedule or eligible retry and resolves the workflow alias.
  2. The adapter submits the intent to Argo. The workflow reports the effective source revision and target binding.
  3. 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.
  4. 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