From fddd8ac69dbe9537821fd86e3c3fd32895fd3f9b Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Wed, 20 Apr 2022 18:53:00 -0700 Subject: [PATCH] Fix Flatcar Linux nodes on Google Cloud not ignoring image changes * Add `boot_disk[0].initialize_params` to the ignored fields for the controller nodes * Nodes will auto-update, Terraform should not attempt to delete and recreate nodes (especially controllers!). Lack of this ignore causes Terraform to propose deleting controller nodes when Flatcar Linux releases new images * Matches the configuration on Typhoon Fedora CoreOS (which does not have the issue) --- CHANGES.md | 5 +++++ google-cloud/flatcar-linux/kubernetes/controllers.tf | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3a4a3eb9..5a1a97a2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,11 @@ Notable changes between versions. * Allow upgrading Azure Terraform provider to v3.x ([#1144](https://github.com/poseidon/typhoon/pull/1144)) * Rename `worker_address_prefix` output to `worker_address_prefixes` +### Google Cloud + +* Fix issue on Flatcar Linux with controller nodes not ignoring os image changes + * Nodes will auto-update, Terraform should not attempt to delete/recreate them + ### Addons * Update nginx-ingress from v1.1.2 to [v1.1.3](https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.1.3) diff --git a/google-cloud/flatcar-linux/kubernetes/controllers.tf b/google-cloud/flatcar-linux/kubernetes/controllers.tf index 3133b215..76fbe66e 100644 --- a/google-cloud/flatcar-linux/kubernetes/controllers.tf +++ b/google-cloud/flatcar-linux/kubernetes/controllers.tf @@ -59,7 +59,10 @@ resource "google_compute_instance" "controllers" { tags = ["${var.cluster_name}-controller"] lifecycle { - ignore_changes = [metadata] + ignore_changes = [ + metadata, + boot_disk[0].initialize_params + ] } }