rolling-update: log reason for InstanceGroup needing update - #18618
rolling-update: log reason for InstanceGroup needing update#18618shreyaabaranwal wants to merge 1 commit into
Conversation
Signed-off-by: shreyaabaranwal <shreyabaranwal229@gmail.com>
|
Hi @shreyaabaranwal. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for the shoutout @shreyaabaranwal. I wish you have better luck in getting someone notice your PR :) |
|
Thanks @guerzon! Your PR was a great reference- the approach you took was spot on, it just needed a bit more visibility. Hopefully this one gets there with the extra provider coverage. Appreciate you stopping by 🙂 |
Fixes #14122
When
kops rolling-update clusterruns, InstanceGroups can end up inNeedsUpdatestate for several different reasons (launchtemplate/config drift, detached instances, the
kops.k8s.io/needs-updateannotation, provider-specific tags/labels,etc.), but there was no user-facing indication of why a particular
InstanceGroup or instance needed an update.
As suggested by @olemarkus in the issue, this adds a
fmt.Printf()line at each point where an instance is marked
NeedsUpdate,stating the specific reason. Existing
klogcalls are leftuntouched where they're already at the right verbosity (e.g. the
klog.V(4)launch-template-version logs inaws_cloud.go) — thisis purely additive, no logic changes.
This is inspired by #16079 (@guerzon, 2023), which took the same
approach but never got a maintainer review and was closed by the
stale-bot after 90 days of inactivity — not a technical rejection.
Providers covered:
Karpenter-managed instance groups are intentionally not touched:
that code path (
buildKarpenterGroup) no longer has aNeedsUpdatebranch - Karpenter nodes are tracked via the generic
kops.k8s.io/needs-updateannotation path instead.