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

fix: [M3-9063] - Display Kubernetes API endpoint for LKE-E cluster #11485

Merged

Conversation

hana-akamai
Copy link
Contributor

@hana-akamai hana-akamai commented Jan 7, 2025

Description 📝

Due to the way that existing code was written, we were only returning Kubernetes API endpoints for clusters if the endpoint matched port 443 (e.g. /linodelke\.net:443). However, LKE-E endpoints use the 6443 port so nothing was returning

This PR adds a check to render the first available endpoint if port 443 is not available

Changes 🔄

List any change(s) relevant to the reviewer.

  • Render the first available endpoint if endpoint with port 443 is not available
  • Added some unit tests

Preview 📷

Before After
image image

How to test 🧪

Prerequisites

(How to setup test environment)

  • Ensure you have LKE-E customer tags (check project tracker)
  • Have an LKE-E cluster created

Reproduction steps

(How to reproduce the issue, if applicable)

  • On another branch (e.g. develop), go to the details page of an LKE-E cluster
  • The Kubernetes API endpoint displays Your endpoint will be displayed here once it is available.

Verification steps

(How to verify changes)

  • Checkout this PR or use the preview link, go to the details page of an LKE-E cluster
  • The Kubernetes API endpoint displays the first endpoint available (should be something like https://lke287706.us-ord.enterprise.linodelke.net:6443)
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 unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@hana-akamai hana-akamai added Bug Fixes for regressions or bugs LKE-Enterprise labels Jan 7, 2025
@hana-akamai hana-akamai self-assigned this Jan 7, 2025
@hana-akamai hana-akamai marked this pull request as ready for review January 7, 2025 21:10
@hana-akamai hana-akamai requested a review from a team as a code owner January 7, 2025 21:10
@hana-akamai hana-akamai requested review from bnussman-akamai, hkhalil-akamai and mjac0bs and removed request for a team January 7, 2025 21:10
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Perfect, and thanks for adding the test coverage!

@mjac0bs mjac0bs added the Add'tl Approval Needed Waiting on another approval! label Jan 7, 2025
@hkhalil-akamai hkhalil-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Coverage Report:
Base Coverage: 86.97%
Current Coverage: 86.97%

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 478 passing tests on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing478 Passing2 Skipped103m 39s

@hana-akamai hana-akamai merged commit 2199d1c into linode:develop Jan 8, 2025
23 checks passed
@hana-akamai hana-akamai deleted the M3-9063-kube-api-endpoint-lke-e branch January 8, 2025 19:57
Copy link

cypress bot commented Jan 8, 2025

Cloud Manager E2E    Run #7055

Run Properties:  status check passed Passed #7055  •  git commit 2199d1cc92: fix: [M3-9063] - Display Kubernetes API endpoint for LKE-E cluster (#11485)
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #7055
Run duration 27m 03s
Commit git commit 2199d1cc92: fix: [M3-9063] - Display Kubernetes API endpoint for LKE-E cluster (#11485)
Committer Hana Xu
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 478
View all changes introduced in this branch ↗︎

dmcintyr-akamai pushed a commit to dmcintyr-akamai/manager that referenced this pull request Jan 9, 2025
…inode#11485)

## Description 📝
Due to the way that existing code was written, we were only returning Kubernetes API endpoints for clusters if the endpoint matched port 443 (e.g. `/linodelke\.net:443`). However, LKE-E endpoints use the `6443` port so nothing was returning

This PR adds a check to render the first available endpoint if port 443 is not available

## Changes  🔄

List any change(s) relevant to the reviewer.

- Render the first available endpoint if endpoint with port 443 is not available
- Added some unit tests

## How to test 🧪

### Prerequisites

(How to setup test environment)

- Ensure you have LKE-E customer tags (check project tracker)
- Have an LKE-E cluster created

### Reproduction steps

(How to reproduce the issue, if applicable)

- [ ] On another branch (e.g. `develop`), go to the details page of an LKE-E cluster
- [ ] The Kubernetes API endpoint displays `Your endpoint will be displayed here once it is available.`

### Verification steps

(How to verify changes)

- [ ] Checkout this PR or use the preview link, go to the details page of an LKE-E cluster
- [ ] The Kubernetes API endpoint displays the first endpoint available (should be something like `https://lke287706.us-ord.enterprise.linodelke.net:6443`)
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! Bug Fixes for regressions or bugs LKE-Enterprise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants