aws / aws/eks-anywhere

Remove cluster config defaults from upgrade flow

Open
#441 0 comments 0 reactions 0 assignees View on GitHub
area/cli kind/enhancement priority/p1 stale status/notstarted team/cli
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

Currently, we only trigger CP and Workers upgrade if the new cluster config (including cluster crd and some of provider specific ones) differs from the one installed in the cluster.

This could be problematic: since we set some defaults for certain fields in the config if the user hasn't provided them, we could be triggering upgrades that are not desired if those default values change from create to upgrade.

As part of #399 discussion, we agreed on implementing a behavior closer to what kubectl does, where during a resource update, unset are never updated and a 3-way merge is done with the current value of the resource. So whatever was set during cluster creation, if not overwritten explicitly by the spec file when running `upgrade cluster`, it will remain untouched.

This would require some refactors in the provider code, since right now setting defaults and validations are tied together. It will also probably require removing side effects from the `govc` executable methods. It might also require updating some of the provider logic to be able to handle the values provided by the user (like paths).

It is advised to split this work into multiple phases.

Contributor guide

Open the contributing guide

Research direction

Start with the provider code that sets defaults and validates cluster configuration, then inspect the govc executable methods and the `upgrade cluster` flow. Split the work into phases; done means unset fields survive upgrades through a kubectl-like three-way merge, defaults do not trigger unintended control-plane or worker upgrades, and provider paths remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.