`maxSurge` default not recognized by validation
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
#### Summary
The [documentation site indicates](https://anywhere.eks.amazonaws.com/docs/clustermgmt/cluster-upgrades/baremetal-upgrades/#advanced-configuration-for-rolling-upgrade) the rolling update strategy's `maxSurge` option should default to 1, CAPIs default. However, when leaving the field empty we receive a validation error stating it cannot be the same as `maxUnavailable`.
```
2023-10-17T18:49:41.982Z V0 Warning: The recommended number of control plane nodes is 3 or 5
Error: failed to upgrade cluster: the cluster config file provided is invalid: validating upgrade rollout strategy configuration: WorkerNodeGroupConfiguration: maxSurge and maxUnavailable not specified or are 0. maxSurge and maxUnavailable cannot both be 0
```
#### Steps to reproduce
1. Create a bare metal cluster with a single worker node group containing 1 node; do not specify an upgrade rollout strategy.
2. Change the cluster config to include the upgrade rollout strategy:
```
upgradeRolloutStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
```
3. Attempt to upgrade and observe the error.
Contributor guide
Research direction
Start by reproducing the validation error with a bare metal cluster containing one worker node group and the shown upgradeRolloutStrategy configuration. Trace the validation entry point for WorkerNodeGroupConfiguration and compare the empty maxSurge behavior with the documented default of 1. Done means the configuration with maxUnavailable set to 0 validates and the upgrade proceeds without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100