From 65632f9b7e9bbbeb72c18e3dc58ece6fa3827ba9 Mon Sep 17 00:00:00 2001 From: Jose Armesto Date: Wed, 16 Oct 2024 20:08:58 +0200 Subject: [PATCH] Expose maxHealthyPercentage field (#912) * Expose maxHealthyPercentage field * Update helm/cluster-aws/values.schema.json Co-authored-by: Marco Ebert * Fix field title --------- Co-authored-by: Marco Ebert --- CHANGELOG.md | 4 ++++ helm/cluster-aws/README.md | 3 ++- helm/cluster-aws/templates/_machine_pools.tpl | 3 ++- helm/cluster-aws/values.schema.json | 13 ++++++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 861bdb08..bc14c13b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Expose the `maxHealthyPercentage` property to allow setting the maximum percentage of healthy machines in the Auto Scaling Group during upgrades. + ## [2.2.0] - 2024-09-23 ### Added diff --git a/helm/cluster-aws/README.md b/helm/cluster-aws/README.md index da3548c8..58f4e0a6 100644 --- a/helm/cluster-aws/README.md +++ b/helm/cluster-aws/README.md @@ -402,8 +402,9 @@ Node pools of the cluster. If not specified, this defaults to the value of `clus | `global.nodePools.PATTERN.instanceWarmup` | **Time interval, in seconds, between node replacement.**|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
| | `global.nodePools.PATTERN.libVolumeSizeGB` | **Lib volume size (GB)** - Size of the volume mounted at `/var/lib` on the worker nodes. This disk is shared between kubelet folder `/var/lib/kubelet` and containerd folder `/var/lib/containerd`s.|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
**Default:** `120`| | `global.nodePools.PATTERN.logVolumeSizeGB` | **Log volume size (GB)** - Size of the volume mounted at `/var/log` on the worker nodes.|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
**Default:** `30`| +| `global.nodePools.PATTERN.maxHealthyPercentage` | **Maximum percentage of instances that can be in service when replacing instances.** - The percentage of capacity in ASG that can be in service and healthy, or pending, to support your workload when replacing instances. A larger range increases the number of instances that can be replaced at the same time. The difference between minHealthyPercentage and maxHealthyPercentage cannot be greater than 100.|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
**Default:** `100`| | `global.nodePools.PATTERN.maxSize` | **Maximum number of nodes**|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
| -| `global.nodePools.PATTERN.minHealthyPercentage` | **Minimum percentage of instances that must remain healthy during node replacement.**|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
| +| `global.nodePools.PATTERN.minHealthyPercentage` | **Minimum percentage of instances that must remain healthy during node replacement.**|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
**Default:** `90`| | `global.nodePools.PATTERN.minSize` | **Minimum number of nodes**|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
| | `global.nodePools.PATTERN.rootVolumeSizeGB` | **Root volume size (GB)**|**Type:** `integer`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
**Default:** `8`| | `global.nodePools.PATTERN.spotInstances` | **Spot instances** - Compared to on-demand instances, spot instances can help you save cost.|**Type:** `object`
**Key pattern:**
`PATTERN`=`^[a-z0-9][-a-z0-9]{3,18}[a-z0-9]$`
| diff --git a/helm/cluster-aws/templates/_machine_pools.tpl b/helm/cluster-aws/templates/_machine_pools.tpl index 956e2f4c..3974a75b 100644 --- a/helm/cluster-aws/templates/_machine_pools.tpl +++ b/helm/cluster-aws/templates/_machine_pools.tpl @@ -79,7 +79,8 @@ spec: {{- end }} refreshPreferences: instanceWarmup: {{ $value.instanceWarmup | default 600 }} - minHealthyPercentage: {{ $value.minHealthyPercentage | default 90 }} + minHealthyPercentage: {{ $value.minHealthyPercentage }} + maxHealthyPercentage: {{ $value.maxHealthyPercentage }} ignition: version: "3.4" --- diff --git a/helm/cluster-aws/values.schema.json b/helm/cluster-aws/values.schema.json index 950ad4f0..b09dfc43 100644 --- a/helm/cluster-aws/values.schema.json +++ b/helm/cluster-aws/values.schema.json @@ -196,13 +196,24 @@ "description": "Size of the volume mounted at `/var/log` on the worker nodes.", "default": 30 }, + "maxHealthyPercentage": { + "type": "integer", + "title": "Maximum percentage of instances that can be in service when replacing instances.", + "description": "The percentage of capacity in ASG that can be in service and healthy, or pending, to support your workload when replacing instances. A larger range increases the number of instances that can be replaced at the same time. The difference between minHealthyPercentage and maxHealthyPercentage cannot be greater than 100.", + "default": 100, + "maximum": 200, + "minimum": 100 + }, "maxSize": { "type": "integer", "title": "Maximum number of nodes" }, "minHealthyPercentage": { "type": "integer", - "title": "Minimum percentage of instances that must remain healthy during node replacement." + "title": "Minimum percentage of instances that must remain healthy during node replacement.", + "default": 90, + "maximum": 100, + "minimum": 0 }, "minSize": { "type": "integer",