feat: move nodepool replace and patch from frontend to backend - #5141
Miguel Soriano (miguelsorianod) wants to merge 3 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
| // that indicates that the nodepool is in "updating" state on CS side but that technically doesn't cover case 1 if somehow CS can end up in a | ||
| // 'updating' state not triggered by this controller. | ||
| logger.Info("dispatching PATCH node pool to Cluster Service", "cs_node_pool_href", csIDFromNodePool.String(), "node_pool_resource_id", nodePool.ID.String()) | ||
| _, err = c.clustersServiceClient.UpdateNodePool(ctx, csIDFromNodePool, csNodePoolBuilder) |
There was a problem hiding this comment.
This is potentially the biggest contention point in the PR.
There was a problem hiding this comment.
Yeah, you're gonna have to check CS error messages. See this for an example.
|
Maybe let's focus on #5142 first and get that right. I made some comments there that are also applicable here. |
|
As an important insight, we should move delete before and/or at the same time than create because of #5142 (comment) |
On backend now we check whether internalID is empty or not to assess whether the nodepool create request to Clusters Service has been submitted. Once that occurs, we check the state. We introduce a controller DispatchNodePoolUpdate that takes care of making sure that a PATCH call is sent to CS when a nodepool replace or patch has been issued through the Frontend resulting in a nodepool update active operation. Although the controller has been introduced, for now it is not active because on the frontend side we still send the InternalID in the active operation and the controller does not do any action when the InternalID has been set. The controller attempts to be resilient to failures.
This commit moves nodepool replace and patch from frontend to backend. Frontend now just creates the corresponding ARM Operation, a nodepool update operation, and it delegates all the actual nodepool replace and patch work to backend.
eb7769e to
ac341e2
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: miguelsorianod 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 |
|
PR needs rebase. 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. |
|
Superseded by #6067 |
This moves nodepool replace and patch from frontend to backend. Frontend now just creates the corresponding ARM Operation, a nodepool update operation, and it delegates all the actual nodepool replace and patch work to backend.
On backend now we check whether internalID is empty or not to assess
whether the nodepool patch request to Clusters Service has been
submitted. Once that occurs, we check the state.
We introduce a controller DispatchNodePoolUpdate that takes care of
making sure that a PATCH call is sent to CS when a nodepool replace
or patch has been issued through the Frontend resulting in a nodepool
update active operation.