From c6586b69fd4a2e66fb4abba7967445916614002a Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sun, 18 Nov 2018 16:57:54 -0800 Subject: [PATCH] Use eviction policy Delete for Low priority VMSS workers * Fix issue where Azure defaults to Deallocate eviction policy, which required manually restarting deallocated workers * Require terraform-provider-azurerm v1.19+ to support setting the eviction_policy --- CHANGES.md | 6 ++++++ azure/container-linux/kubernetes/require.tf | 2 +- azure/container-linux/kubernetes/workers/workers.tf | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 60060baa..c8dbe134 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,12 @@ Notable changes between versions. * Enable CoreDNS `loop` and `loadbalance` plugins ([#340](https://github.com/poseidon/typhoon/pull/340)) * Use kubernetes-incubator/bootkube v0.14.0 +#### Azure + +* Use eviction policy `Delete` for `Low` priority virtual machine scale set workers ([#343](https://github.com/poseidon/typhoon/pull/343)) + * Fix issue where Azure defaults to `Deallocate` eviction policy, which required manually restarting deallocated instances. `Delete` policy aligns Azure with AWS and GCP behavior. + * Require `terraform-provider-azurerm` v1.19+ (action required) + #### Addons * Update Prometheus from v2.4.3 to v2.5.0 diff --git a/azure/container-linux/kubernetes/require.tf b/azure/container-linux/kubernetes/require.tf index b375346c..5d350636 100644 --- a/azure/container-linux/kubernetes/require.tf +++ b/azure/container-linux/kubernetes/require.tf @@ -5,7 +5,7 @@ terraform { } provider "azurerm" { - version = "~> 1.17" + version = "~> 1.19" } provider "local" { diff --git a/azure/container-linux/kubernetes/workers/workers.tf b/azure/container-linux/kubernetes/workers/workers.tf index 87642ad8..ba0ded97 100644 --- a/azure/container-linux/kubernetes/workers/workers.tf +++ b/azure/container-linux/kubernetes/workers/workers.tf @@ -67,8 +67,9 @@ resource "azurerm_virtual_machine_scale_set" "workers" { } # lifecycle - priority = "${var.priority}" upgrade_policy_mode = "Manual" + priority = "${var.priority}" + eviction_policy = "Delete" } # Scale up or down to maintain desired number, tolerating deallocations.