nginx not updating with Terraform / Helm
I have an existing K8 cluster with nginx as reverse proxy. The cluster is set up via Terraform with Helm charts for all pods, including nginx. It runs fine.
I need to update the configuration for the nginx pod via Terraform / Helm and I’m making the necessary changes for the input variables that ultimately go into the new Helm chart.
When deploying, Terraform shows me the following sequence of what will be done:
# module.nginx.data.kubernetes_service.nginx will be read during apply
# module.nginx.azurerm_key_vault_secret.nginx_url will be updated in-place
# module.nginx.helm_release.nginx will be updated in-place
~ resource "helm_release" "nginx" {
~ dependency_update = false -> true
~ force_update = false -> true
id = "nginx"
name = "nginx"
+ values = [
+ <<-EOT
allowableIPs:
- "52.24.34.195/32"
- "78.140.7.100/32"
- "92.126.232.162/32"
- "100.15.233.56/32"
EOT,
]
~ version = "0.9.0" -> "13.2.23"
# (23 unchanged attributes hidden)
- set {
- name = "deploymenttrigger" -> null
- value = "n1.0.4" -> null
}
- set {
- name = "retailer" -> null
- value = "test001" -> null
}
+ set {
+ name = "deploymenttrigger"
+ value = "n1.0.02"
}
+ set {
+ name = "retailer"
+ value = "devsecure"
}
# (9 unchanged blocks hidden)
}
which is everything I expect. Yet, when Terraform shows the deployment as complete, the nginx pod is still the old one, no update in place or replacement. The Helm Release for the pod has the old data. In my desparation, I even changed the helm chart version hoping for some kind of an impact.
The TF resource for nginx is:
resource "helm_release" "nginx" {
name = "nginx"
chart = "./${path.module}/nginx"
namespace = "ns-rebotics"
force_update = true
recreate_pods = true
create_namespace = true
dependency_update = true
timeout = 600
... stuff omitted.
}
Read more here: Source link
