From cccb904f9a9e08ddf65cf1f8b24aaf23093dc70e Mon Sep 17 00:00:00 2001 From: michaelhtm <98621731+michaelhtm@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:28:05 -0700 Subject: [PATCH] chore: Set cluster status to updating after successful update Currently, when we successfully update an EKS cluster, trigger a controller 15 second requeue. During these 15 seconds, the actual cluster Status does not get updated, meaning, if previously it was Active, it will remain Active until the end of the 15 seconds where the controller will change it to Updating. With this change, we will be setting the Updating status ourselves when the update api call is successful, and during the next reconciliation (still 15 seconds) the controller will change it to whatever status is returned by the AWS API. --- pkg/resource/cluster/hook.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/resource/cluster/hook.go b/pkg/resource/cluster/hook.go index a0b647d..0a2861a 100644 --- a/pkg/resource/cluster/hook.go +++ b/pkg/resource/cluster/hook.go @@ -168,6 +168,7 @@ func clusterDeleting(r *resource) bool { func returnClusterUpdating(r *resource) (*resource, error) { msg := "Cluster is currently being updated" ackcondition.SetSynced(r, corev1.ConditionFalse, &msg, nil) + r.ko.Status.Status = aws.String(string(svcsdktypes.ClusterStatusUpdating)) return r, requeueAfterAsyncUpdate() } @@ -451,7 +452,7 @@ func (rm *resourceManager) updateVersion( ) } - // Compure the next minor version of the desired version + // Compute the next minor version of the desired version nextVersion, err := util.IncrementEKSMinorVersion(*latest.ko.Spec.Version) if err != nil { return ackerr.NewTerminalError(fmt.Errorf("failed to compute the next minor version: %v", err))