Skip to content

Conversation

@mjac0bs
Copy link
Contributor

@mjac0bs mjac0bs commented Jul 22, 2025

Description 📝

The Networking section of the cluster create flow (formerly "VPC & Firewall") is getting new options to support the user's selection of VPC.

Note

  • Known issue: ALL VPCs will show up in the VPC select, regardless of whether the user has grant access to the VPC or not. This is intended, though not ideal, behavior from the API. We will not modify it here, to maintain parity with the API. This will be better enforced in the future with IAM.
  • The API will handle subnet sizing. Since subnet sizes are in-flux on the backend, we will not hardcode any size validation or guidance. As a future enhancement, we likely add a tooltip with a generic statement about sizing.
  • We will surface API error messages, such as the following:
    • It should deny creating a cluster if the ipv4 subnet is not length /13 or /14 and the ipv6 subnet is not /52
    • It should deny creating a cluster if there is no /13 ipv4 subnet available inside the range 10.0.0.0/8
    • It should deny creating a cluster if there is no /52 ipv6 subnet available inside the VPC

Changes 🔄

  • Updated ClusterNetworkingPanel.tsx with radio buttons to support an auto-generation option and a Bring-Your-Own (BYO) VPC option
  • Updated the CreateCluster component as needed to support the new form values (vpc_id, subnet_id)
  • Enforced validation on the VPC selection iff the BYO VPC option is selected
  • Set up initial API error handling (may follow this up with another PR later to refine error handling based on any shifting requirements)
  • Added a unit test for ClusterNetworkingPanel

Target release date 🗓️

⚠️ 8/12 (devcloud: 8/7) - want this in this upcoming release for Product visibility and LKE QA

Preview 📷

Before After
LKE-Enterprise LA VPC section: Screenshot 2025-07-30 at 9 46 00 PM Region unselected: Screenshot 2025-07-30 at 9 46 15 PM Region selected, fields filled: Screenshot 2025-07-30 at 9 46 39 PM Surfaced client-side validation error: Screenshot 2025-07-30 at 9 48 34 PM Surfaced API errors: Screenshot 2025-07-30 at 9 19 06 PM

How to test 🧪

Prerequisites

(How to setup test environment)

  • Ensure you have the LKE-Enterprise tag on your account (project tracker)
  • Ensure the LKE-Enterprise feature flag is enabled locally (enabled, LA, and phase2Mtc should all be checked)
  • Turn on MSW in CRUD mode

Verification steps

(How to verify changes)

  • Check out this branch and go to the cluster create page

LKE-E:

  • Select the 'enterprise' tier
  • Confirm that you can see the VPC section below the IP Networking section
  • Confirm the default selection is Automatically generate a VPC for this cluster
  • Confirm client-side validation: if the user has the "Use an existing VPC" selected, then an existing VPC must be selected. Confirm the error message displays when expected, and it clears if the selection is changed to autogenerated VPC.
  • Confirm (mocked) API validation: Uncomment the block in the kubernetes.ts handlers POST /v4beta/clusters request and observe the error responses on the VPC and Subnet fields are surfaced.
  • Submit the form with different selections and confirm the mocked POST /v4beta/clusters includes the expected data in the payload.
    • An existing VPC is selected, subnet is None: vpc_id is present, subnet_id is not
    • An existing VPC is selected, existing subnet is selected: vpc_id and subnet_id is present
    • An autogenerated VPC is selected: neither vpc_id or subnet_id are present

LKE:

  • Select the 'standard' tier
  • Confirm that you can't see any VPC section
  • Submit the form and confirm the mocked POST /v4beta/clusters does not include vpc_id or subnet_id in the payload

Feature flag:

  • Turn off the phase2Mtc feature flag and confirm you see the existing "VPC & Firewall" section for enterprise only

Tests:

  • Confirm Cypress tests pass with no regressions
  • Confirm pnpm test ClusterNetworkingPanel passes
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@mjac0bs mjac0bs self-assigned this Jul 22, 2025
@mjac0bs mjac0bs force-pushed the M3-10201-add-byo-vpc-to-lke-create-flow branch 2 times, most recently from d1e50ca to 0061ee3 Compare July 28, 2025 21:47
@mjac0bs mjac0bs force-pushed the M3-10201-add-byo-vpc-to-lke-create-flow branch from 0061ee3 to 37bc470 Compare July 28, 2025 21:52
)}
/>
</Stack>
<Stack divider={<Divider />} spacing={3}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just removed the fragment here; no other changes to the IP Version radio group.

@mjac0bs mjac0bs marked this pull request as ready for review July 31, 2025 14:54
@mjac0bs mjac0bs requested a review from a team as a code owner July 31, 2025 14:54
@mjac0bs mjac0bs requested review from bnussman-akamai, cpathipa and hana-akamai and removed request for a team July 31, 2025 14:54
@mjac0bs mjac0bs requested a review from bnussman-akamai July 31, 2025 22:09
@mjac0bs mjac0bs added the Add'tl Approval Needed Waiting on another approval! label Aug 4, 2025
@hana-akamai
Copy link
Contributor

hana-akamai commented Aug 4, 2025

Confirm client-side validation: if the user has the "Use an existing VPC" selected, then an existing VPC must be selected. Confirm the error message displays when expected, and it clears if the selection is changed to autogenerated VPC.

I'm briefly seeing the client-side validation but the request to create is still going through 🤔

Screen.Recording.2025-08-04.at.5.28.38.PM.mov

@mjac0bs
Copy link
Contributor Author

mjac0bs commented Aug 4, 2025

@hana-akamai Is it the same behavior if you have the postLa flag off and phase2Mtc flag (plus enabled and la) on only?

Edit: Okay, yep, I can repro. No relation to postLa. Will look into this. 👀

@mjac0bs
Copy link
Contributor Author

mjac0bs commented Aug 4, 2025

@hana-akamai Thank you - that error should actually block form submission and be scrolled to now. (b40576b)

Screen.Recording.2025-08-04.at.3.01.39.PM.mov

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 3 failing tests on test run #14 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
3 Failing697 Passing5 Skipped120m 9s

Details

Failing Tests
SpecTest
linode-storage.spec.tsCloud Manager Cypress Tests→linode storage tab » linode storage tab
access-key.e2e.spec.tsCloud Manager Cypress Tests→object storage access key end-to-end tests » object storage access key end-to-end tests
object-storage-objects-multicluster.spec.tsCloud Manager Cypress Tests→Object Storage Multicluster objects » Object Storage Multicluster objects

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/linode-storage.spec.ts,cypress/e2e/core/objectStorage/access-key.e2e.spec.ts,cypress/e2e/core/objectStorageMulticluster/object-storage-objects-multicluster.spec.ts"

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Aug 5, 2025
@hana-akamai hana-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! Ready for Review labels Aug 5, 2025
@mjac0bs mjac0bs merged commit 69396ac into linode:develop Aug 5, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge! LKE-Enterprise 🚨 Urgent

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants