Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EKS: edit imported clusters, and clusters with exclusively self-managed nodes #11294

Merged

Conversation

mantis-toboggan-md
Copy link
Member

@mantis-toboggan-md mantis-toboggan-md commented Jun 25, 2024

Summary

Fixes #11100
Fixes #11104
Fixes #10335
Fixes #11291

Occurred changes and/or fixed issues

This PR updates EKS provisioning to incorporate the same upstream syncing behavior as AKS - see #11120 for some background on why this is needed. This PR adds some fixes to the syncing utility as well as unit tests around the problems I found while working on the PR. There are also some minor fixes around the EKS components to correct console errors shown when editing an imported cluster.

Special notes about EKS:

  • imported clusters with no nodeGroups are valid (they may have self-managed nodes)
  • After following aws instructions to create an EKS cluster with default values and importing it into Rancher, the subnet/virtual network configuration is indistinguishable from an EKS cluster provisioned in Rancher with the 'Create a new VPC and subnet automatically' option selected. The old UI just shows that option selected for imported clusters.
  • In this PR I updated the networking tab to use the subnets from the upstream status instead, so the user can see which VPC/subnets are in use by the current cluster.

Areas or cases that should be tested

  1. Edit an imported cluster with exclusively self-managed nodes (no node groups)
  2. Edit an imported cluster with node groups
    • user should be able to make all the same changes as they can with a Rancher-provisioned EKS cluster
    • the networking tab should show a list of selected subnets

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@@ -409,6 +418,9 @@ export default defineComponent({
},

async actuallySave(): Promise<void> {
if (!this.isNewOrUnprovisioned && !this.nodeGroups.length) {
delete this.normanCluster.eksConfig.nodeGroups;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.normanCluster.eksConfig is possibly undefined. We can include it in the if condition before delete.

Copy link
Member

@torchiaf torchiaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@torchiaf torchiaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment to add the null check.

@mantis-toboggan-md
Copy link
Member Author

Updated to include #11291 - the same syncUpstreamConfig functionality needs to be added to GKE provisioning. No extra logic around node groups needed for GKE though.

@mantis-toboggan-md
Copy link
Member Author

I hit an additional issue with this: due to pre-existing norman api validation it's not possible to add node groups then delete all node groups through the UI. I've separated that out into a different issue, as it needs backend work as well and the other fixes in this PR are required to reproduce the bug.

Copy link
Member

@torchiaf torchiaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mantis-toboggan-md mantis-toboggan-md merged commit 2e345ea into rancher:master Jul 3, 2024
28 checks passed
nwmac pushed a commit to nwmac/dashboard that referenced this pull request Oct 24, 2024
…ed nodes (rancher#11294)

* sync upstream eks spec on edit

* allow for nil nodeGroups

fix networking subnet mode display

* split up syncUpstreamConfig test

* update subnets display for imported clusters and clusters that had been configured to create a vpc and subnet automatically

* fix ts in eks save function

* add syncUpstreamConfig to gke provisioning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants