Upgrade
With Helm
Helm installs a chart's crds/ on the first install and never touches them again, so apply the new release's CRDs yourself first, before the new controller starts writing:
kubectl apply --server-side --force-conflicts \
-f https://raw.githubusercontent.com/kubevela/terraform-controller/v0.9.1/chart/crds/terraform.core.oam.dev_configurations.yaml \
-f https://raw.githubusercontent.com/kubevela/terraform-controller/v0.9.1/chart/crds/terraform.core.oam.dev_providers.yaml
Without the new CRDs, a field added since your first install (spec.gitRef arrived in 0.8.0) is dropped by the API server when it is written: the Configuration is accepted, and the field is silently gone.
Then upgrade the chart:
helm repo update kubevela
helm upgrade terraform-controller kubevela/terraform-controller --version 0.9.1 -n <namespace> --reuse-values
With the KubeVela addon
vela addon upgrade terraform upgradeCRD=true
upgradeCRD=true has the addon upgrade the CRDs along with the chart. The addon decides the chart version, not you: see the Versions page for what it installs.
Upgrade notes
To 0.9.1 (and 0.8.2)
A Configuration now writes into, and deletes, only the connection Secret it created, labelled as its own:
terraform.core.oam.dev/created-by: terraform-controller
terraform.core.oam.dev/owned-by: <configuration name>
terraform.core.oam.dev/owned-namespace: <configuration namespace>
Secrets the controller created since 0.7.10 carry these labels already, so nothing changes for them. A Configuration whose writeConnectionSecretToRef names some other Secret has already run its apply, and waits in GeneratingTerraformOutputs with a message saying why:
- Another Configuration owns the Secret: two Configurations write one Secret. Give one of them another
writeConnectionSecretToRef. - No Configuration owns it: if it is this Configuration's, written by a controller older than 0.7.10, label it as the message shows (
kubectl label secret --overwrite -n <ns> <secret> terraform.core.oam.dev/created-by=terraform-controller terraform.core.oam.dev/owned-by=<name> terraform.core.oam.dev/owned-namespace=<ns>). If it belongs to something else, pointwriteConnectionSecretToRefat a new name.
To 0.9.0
- The images the controller starts are pinned by digest, and no longer float on
latest:terraformImageisoamdev/docker-terraform:1.1.6@sha256:92a21948dfb27dd2e842077adcc769dd85bcf8b1e0785eb0abcf24895858b881(Terraform 1.1.9 on Alpine 3.24), withgitImageandbusyboxImagepinned the same way in the chart's values. The controller's own image is the release tag. If you mirror images, mirror these digests. - Built with Go 1.27.1 and Kubernetes client libraries v0.37. The
linux/arm64image now really contains an arm64 controller. jobNodeSelectorworks as a map or a JSON string; a value wrapped in single quotes, the old workaround, keeps working.spec.remotewithgitCredentialsSecretReferenceworks with currentalpine/git(OpenSSH 10).
The full notes are on each GitHub release.