Skip to content

Clear tunnelingAgentIP when expose strategy is not Tunneling #7422

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

Conversation

KhizerRehan
Copy link
Contributor

@KhizerRehan KhizerRehan commented Jun 11, 2025

What this PR does / why we need it:

This PR fixes a validation issue by clearing the tunnelingAgentIP field when the selected expose strategy is anything other than "Tunneling".

Video:

620cb5afe9d89a8682ce8299c5b8f483.mp4

Which issue(s) this PR fixes:

Fixes #7302

What type of PR is this?

/kind bug

Special notes for your reviewer:

Fixes validation error when switching expose strategy by allowing tunnelingAgentIP to be cleared, enabling saving the cluster template with a different strategy.

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

Fix validation error when switching expose strategy from Tunneling to LoadBalancer by clearing tunnelingAgentIP automatically.

Documentation:

NONE

@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 11, 2025
@Waseem826 Waseem826 self-requested a review June 11, 2025 12:06
const exposeStrategy = this.form.get(Controls.ExposeStrategy).value;
const clusterNetwork = this._clusterSpecService.cluster.spec.clusterNetwork;
if (exposeStrategy === ExposeStrategy.tunneling) {
clusterNetwork.tunnelingAgentIP = clusterNetwork.tunnelingAgentIP || '100.64.30.10';
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for the default value and just set tunnelingAgentIP to null if expose strategy is not tunneling. Also, there is a similar check in https://github.com/kubermatic/dashboard/blob/main/modules/web/src/app/wizard/component.ts#L290 which should be removed now.

@KhizerRehan KhizerRehan changed the title Reset tunnelingAgentIP based on exposeStrategy Reset tunnelingAgentIP based on expose strategy selection Jun 11, 2025
@KhizerRehan KhizerRehan requested a review from Waseem826 June 11, 2025 13:07
Copy link
Contributor

@Waseem826 Waseem826 left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2025
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3a0152576f9404344368a08814c9f4f5f72d4053

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Waseem826

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

The pull request process is described here

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 11, 2025
@Waseem826 Waseem826 added this to the KKP 2.29 milestone Jun 11, 2025
@Waseem826 Waseem826 added backport-needed Denotes a PR or issue that has not been fully backported. needs-release-testing Denotes a PR or issue that needs to be tested before release. labels Jun 11, 2025
@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@Waseem826
Copy link
Contributor

/hold
To be merged after 2.28

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 11, 2025
@KhizerRehan KhizerRehan deleted the 7302-create-cluster-template-without-tunnling-expose-stategy branch June 19, 2025 12:34
@KhizerRehan KhizerRehan restored the 7302-create-cluster-template-without-tunnling-expose-stategy branch June 19, 2025 12:34
@KhizerRehan KhizerRehan reopened this Jun 19, 2025
@KhizerRehan KhizerRehan changed the title Reset tunnelingAgentIP based on expose strategy selection Clear tunnelingAgentIP when expose strategy is not Tunneling Jun 19, 2025
@Waseem826 Waseem826 removed the do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. label Jun 26, 2025
@ahmadhamzh
Copy link
Contributor

do we want to merge this one ? @Waseem826 @KhizerRehan

@Waseem826
Copy link
Contributor

/unhold

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2025
@kubermatic-bot kubermatic-bot merged commit 14baf13 into kubermatic:main Jun 30, 2025
9 of 10 checks passed
@KhizerRehan
Copy link
Contributor Author

/cherry-pick release/v2.28
/cherry-pick release/v2.27
/cherry-pick release/v2.26

@kubermatic-bot
Copy link
Contributor

@KhizerRehan: new pull request created: #7470

In response to this:

/cherry-pick release/v2.28
/cherry-pick release/v2.27
/cherry-pick release/v2.26

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
Copy link
Contributor

@KhizerRehan: new pull request created: #7471

In response to this:

/cherry-pick release/v2.28
/cherry-pick release/v2.27
/cherry-pick release/v2.26

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
Copy link
Contributor

@KhizerRehan: new pull request created: #7472

In response to this:

/cherry-pick release/v2.28
/cherry-pick release/v2.27
/cherry-pick release/v2.26

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-needed Denotes a PR or issue that has not been fully backported. 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). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. needs-release-testing Denotes a PR or issue that needs to be tested before release. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a cluster template with LoadBalancer expose strategy is not working
5 participants