[release-2.11] 🐛 fix(eks): add ObservedGeneration to AWSManagedControlPlane to prevent missed spec changes#6090
Conversation
… missed spec changes The AWSManagedControlPlane controller could miss spec changes due to controller-runtime event coalescing. When a long reconcile completes, the deferred scope.Close() status patch and an external spec patch (e.g. UpgradePolicy change) can arrive within the same work queue window and get coalesced into a single reconcile that may read stale state. Add status.observedGeneration to AWSManagedControlPlane and wire WithStatusObservedGeneration into the controller's defer block on successful reconciliation, matching the pattern already used by EKSConfigReconciler and NodeadmConfigReconciler. Also add PrincipalUsageAllowedCondition and PrincipalCredentialRetrievedCondition to the ManagedControlPlaneScope's owned conditions list — they were set during scope creation but not declared as owned, causing patch conflicts. Harden the upgrade-policy e2e test by verifying the spec patch is persisted before polling EKS, and increase the EKS API polling timeout from 5 to 10 minutes. Signed-off-by: Damiano Donati <damiano.donati@gmail.com>
…d events When multiple EKS clusters reconcile concurrently, all worker slots can be occupied for 12+ minutes. Watch events that arrive during this window get coalesced in the work queue, causing spec changes to be silently dropped. Add a conditional RequeueAfter when observedGeneration is behind the current generation, ensuring one follow-up reconcile to process any spec change that was coalesced. The controller goes quiescent once observedGeneration catches up. Signed-off-by: Damiano Donati <damiano.donati@gmail.com>
|
[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 |
|
/test ? |
|
/test pull-cluster-api-provider-aws-e2e-release-2-11 /test pull-cluster-api-provider-aws-e2e-eks-release-2-11 |
|
/hold |
|
/test pull-cluster-api-provider-aws-e2e-eks-release-2-11 |
1 similar comment
|
/test pull-cluster-api-provider-aws-e2e-eks-release-2-11 |
|
@k8s-infra-cherrypick-robot: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
This is an automated cherry-pick of #6084
/assign damdo
/cherrypick release-2.10