Skip to content

Fix KubeLB enhancement issues#7958

Open
Copilot wants to merge 3 commits intomainfrom
copilot/fix-kubelb-option-issues
Open

Fix KubeLB enhancement issues#7958
Copilot wants to merge 3 commits intomainfrom
copilot/fix-kubelb-option-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 27, 2026

What this PR does / why we need it:
Fixes several KubeLB option issues in the cluster wizard and edit-cluster dialog:

  • Fixes double tooltip on KubeLB checkbox — when KubeLB is enforced, only the enforced tooltip shows; when not enforced, only the info icon tooltip shows. Uses [matTooltipDisabled] and conditional rendering of the info icon.

  • Hides Kubermatic KubeLB option when enabled: false

  • Adds a warning message on the cluster summary page for AWS/Azure providers when KubeLB is enabled, reminding users to ensure "Assign Public IP" is selected in node settings.

Screenshot 2026-03-31 at 3 44 32 PM

Which issue(s) this PR fixes:
Fixes #7902

What type of PR is this?
/kind bug

Does this PR introduce a user-facing change? Then add your Release Note here:

Adds some KubeLB Enhancements

Documentation:

NONE

@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 27, 2026
Copilot AI linked an issue Mar 27, 2026 that may be closed by this pull request
@kubermatic-bot kubermatic-bot added dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 27, 2026
@kubermatic-bot
Copy link
Copy Markdown
Contributor

Hi @Copilot. Thanks for your PR.

I'm waiting for a kubermatic member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@kubermatic-bot kubermatic-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 27, 2026
@KhizerRehan
Copy link
Copy Markdown
Contributor

/close

@kubermatic-bot
Copy link
Copy Markdown
Contributor

@KhizerRehan: Closed this PR.

Details

In response to this:

/close

Instructions 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.

Copilot stopped work on behalf of Waseem826 due to an error March 27, 2026 13:58
Copilot AI requested a review from Waseem826 March 27, 2026 13:58
@KhizerRehan KhizerRehan removed the request for review from Waseem826 March 27, 2026 13:58
@Waseem826 Waseem826 reopened this Mar 27, 2026
@kubermatic-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from waseem826. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 27, 2026
Copilot AI requested a review from Waseem826 March 27, 2026 14:16
@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Mar 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses several UX and spec-generation issues around configuring KubeLB in the cluster creation wizard and the edit-cluster dialog, and adds a provider-specific warning to the cluster summary.

Changes:

  • Prevent KubeLB sub-options (useLoadBalancerClass, enableGatewayAPI) from being sent as true when the main KubeLB toggle is disabled (wizard + edit).
  • Fix the “double tooltip” behavior on the KubeLB checkbox by disabling the enforced tooltip when not enforced and conditionally rendering the info icon.
  • Add a cluster summary warning banner for AWS/Azure when KubeLB is enabled, reminding users about “Assign Public IP”.
  • Update _isKubeLBEnabled() logic to add datacenter-level explicit disable precedence (wizard + edit).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/web/src/app/wizard/step/cluster/template.html Adjust KubeLB tooltip behavior and conditionally show info tooltip icon.
modules/web/src/app/wizard/step/cluster/component.ts Reset KubeLB sub-options when disabled; update _isKubeLBEnabled() precedence logic.
modules/web/src/app/shared/components/cluster-summary/template.html Render AWS/Azure warning banner when KubeLB is enabled.
modules/web/src/app/shared/components/cluster-summary/style.scss Add styling for the new warning banner.
modules/web/src/app/shared/components/cluster-summary/component.ts Add computed flag for showing the new warning banner.
modules/web/src/app/cluster/details/cluster/edit-cluster/template.html Mirror tooltip behavior changes for KubeLB checkbox in edit dialog.
modules/web/src/app/cluster/details/cluster/edit-cluster/component.ts Mirror sub-option reset + _isKubeLBEnabled() precedence changes in edit dialog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 16.21622% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.14%. Comparing base (082f12a) to head (8f79902).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...dules/web/src/app/wizard/step/cluster/component.ts 0.00% 15 Missing ⚠️
...app/shared/components/cluster-summary/component.ts 0.00% 9 Missing ⚠️
.../cluster/details/cluster/edit-cluster/component.ts 46.15% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7958      +/-   ##
==========================================
- Coverage   45.19%   45.14%   -0.06%     
==========================================
  Files         447      447              
  Lines       20831    20859      +28     
  Branches     2977     2999      +22     
==========================================
+ Hits         9414     9416       +2     
- Misses      11413    11437      +24     
- Partials        4        6       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kubermatic-bot kubermatic-bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Mar 27, 2026
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 27, 2026
@Waseem826
Copy link
Copy Markdown
Contributor

/test all

@kubermatic-bot kubermatic-bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 27, 2026
@KhizerRehan KhizerRehan force-pushed the copilot/fix-kubelb-option-issues branch from 6f87040 to 14d127a Compare March 31, 2026 09:13
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 31, 2026
@KhizerRehan
Copy link
Copy Markdown
Contributor

/test all

// If KubeLB is explicitly configured at the datacenter level with enabled: false, respect that
if (
datacenter.spec.kubelb &&
(datacenter.spec.kubelb.enabled === undefined || datacenter.spec.kubelb.enabled === false)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Waseem826 we needed undefined check because here this struct is receiving from backend side. Manually changing seed setting false e.g

    hetzner-fsn1:
      country: DE
      location: Falkenstein 1 DC 14
      spec:
        hetzner:
          ...
        kubelb:
          enabled: false

is returning undefined when set to false or when property was not added completely and according to @shinushaju we need to hide Kubermatic KubeLB option when it was set to false.

Therefore this check was added as this is omitempty skips property when JSON serialization is done
https://github.com/kubermatic/kubermatic/blob/28dcb972592be71f9369cd55aa54b72ed2c9ee83/sdk/apis/kubermatic/v1/datacenter.go#L1348

However i tested it works find with undefined check but false is added as fallback in case it is fixed from backend side

Ref:

@KhizerRehan KhizerRehan marked this pull request as ready for review March 31, 2026 10:37
@KhizerRehan KhizerRehan changed the title [WIP] Fix KubeLB enhancement issues Fix KubeLB enhancement issues Mar 31, 2026
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 31, 2026
@KhizerRehan KhizerRehan added this to the KKP 2.31 milestone Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KubeLB enhancement

5 participants