A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: Terraform Controller 0.9

Configure the Controller

The chart's values (v0.9.1). Set them with --set or a values file on helm upgrade --install, or, through the KubeVela addon, as values:

vela addon enable terraform values='{"jobBackoffLimit":"5","backend":{"namespace":"tf-state"}}'
ValueDefaultDoes
image.repository, image.tag, image.pullPolicyoamdev/terraform-controller, the chart's version, AlwaysThe controller image.
terraformImageoamdev/docker-terraform:1.1.6@sha256:…The image the Terraform Jobs run: Terraform 1.1.9. Set your own to use another Terraform, or a mirror. Published for linux/amd64 only.
gitImagealpine/git:2.54.0@sha256:…The init container that clones a remote module.
busyboxImagebusybox:1.38.0@sha256:…The init container that copies the HCL into the Job's working directory.
backend.namespacevela-systemWhere the default Kubernetes backend keeps each Configuration's state. Outside KubeVela, set it to a namespace that exists.
controllerNamespace""Run every Terraform Job, and its ConfigMap and variable Secret, in this one namespace instead of each Configuration's own. Their names then use the Configuration's UID.
jobNodeSelectornullNode selector for the Terraform Jobs: a map, or the same as a JSON string.
jobBackoffLimit"" (unlimited)How many times a failing Terraform Job is retried before it is marked failed.
resources.limits, resources.requests500m/500Mi, 250m/250MiCPU and memory for the Terraform Jobs, not for the controller.
githubBlocked'false''true' rewrites remote modules from GitHub to their Gitee mirrors, for clusters that can't reach GitHub.
featureGates.AllowDeleteProvisioningResourcetrueAllow deleting a Configuration whose apply never finished; the destroy cleans up what it did create.
replicaCount1Controller replicas. There is no leader election flag in the chart, so keep it at 1.

To remove jobNodeSelector once set, use --reset-then-reuse-values (Helm 3.14 or later). It starts from the chart's defaults and applies your release's custom values over them, so the rest of your configuration stays, and --set jobNodeSelector=null then removes the key. With --reuse-values instead, Helm merges the old map back in:

helm upgrade terraform-controller kubevela/terraform-controller -n <namespace> \
--reset-then-reuse-values --set jobNodeSelector=null

Controller flags​

The chart sets these on the controller; to change others, patch the Deployment:

FlagDefaultDoes
--controller-namespacefrom controllerNamespaceAs above.
--feature-gatesfrom featureGatesAs above.
--namespaceallWatch Configurations in one namespace only.
--informer-re-sync-interval10sHow often every Configuration is reconciled again.
--metrics-addr:38080Where the controller serves Prometheus metrics.
--enable-leader-electionfalseLeader election, for more than one replica.