Helm upgrades and uninstall

Upgrade the controller, roll back its configuration, and preserve IaCStacks and state.

Use the installation guide to install the controller. Keep the values for your release in version control. The chart creates an immutable ConfigMap from those values and rolls the controller Pods when the configuration changes.

Upgrade the controller and CRD

  1. Inspect the stacks and active workflows. Let active attempts finish before changing an alias, WorkflowTemplate, ServiceAccount, or contract. Keep the current chart version, values, and CRD revision available for recovery.
  2. Read the target release notes and save the existing stack definitions and infrastructure state. If the CRD schema changes, review the compatibility requirements and apply the target manifest explicitly. In a GitOps setup, let the application that owns the CRD apply it first.
  3. Upgrade the chart with the intended version and your values. Verify the rollout and inspect the conditions on an existing stack.

After selecting the release and creating your values.yaml, a manual upgrade in platform-system looks like this.

CHART=oci://ghcr.io/iacstack/charts/iacstack-controller
CHART_VERSION=0.1.0-alpha.2

# Run these two commands when that release requires an updated CRD.
helm show crds "$CHART" --version "$CHART_VERSION" > iacstack-crd.yaml
kubectl apply --server-side -f iacstack-crd.yaml
helm upgrade iacstack-controller "$CHART" --version "$CHART_VERSION" \
  --namespace platform-system --values values.yaml --wait --timeout 4m
kubectl -n platform-system get iacstack

Helm installs the bundled CRD on a fresh install and leaves an existing CRD in place. If another application already owns the CRD, pass --skip-crds on installation. Helm CRD lifecycle

Roll back the release

Use helm history iacstack-controller -n platform-system to identify the previous compatible revision. For example, restore revision 1 with:

helm rollback iacstack-controller 1 --namespace platform-system --wait --timeout 4m
kubectl -n platform-system get iacstack

A Helm rollback restores the controller and its configuration. It leaves the CRD schema and Terraform/OpenTofu state at their current revisions. Check schema compatibility before rolling back the controller. If the controller was installed with Kustomize, plan the handoff of the existing workload and RBAC to Helm. Keep a single active controller for the watched namespace and preserve the CRD, stacks, and backend state.

Uninstall the controller

Finish active workflows and settle the lifecycle of stacks before uninstalling. If a stack uses Destroy, complete and verify its teardown while a compatible controller and workflow still run. The uninstall command removes only the Helm release’s components.

helm uninstall iacstack-controller --namespace platform-system --wait
kubectl get crd iacstacks.iacstack.io
kubectl -n platform-system get iacstack

The CRD, surviving stacks, state, and resources managed by their workflows are preserved. Leave the CRD and the stack namespace in place if those stacks need to be resumed or inspected.