Skip to content

Add listener based on the machine label and listener label #2155

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shilpa-Gokul
Copy link
Contributor

@Shilpa-Gokul Shilpa-Gokul commented Jan 29, 2025

What this PR does / why we need it:
This PR provides support for assigning additional listeners to specific machines based on label selectors. For more details, please refer the proposal

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1678

Special notes for your reviewer:

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Add support for assigning additional listeners to specific machines based on label selectors

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 29, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 29, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @Shilpa-Gokul. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 29, 2025
Copy link

netlify bot commented Jan 29, 2025

Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!

Name Link
🔨 Latest commit 8c431e4
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-ibmcloud/deploys/6830041cd7f49d00086aa118
😎 Deploy Preview https://deploy-preview-2155.cluster-api-ibmcloud.sigs.k8s.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mkumatag
Copy link
Member

@Shilpa-Gokul its worth writing a design doc with more examples, lets do that before this PR.

I like the way it is written here - #2139 for one of the work.

@Karthik-K-N
Copy link
Contributor

@Shilpa-Gokul its worth writing a design doc with more examples, lets do that before this PR.

I like the way it is written here - #2139 for one of the work.

Yes, We have already planned to do so, With some diagrams and examples, That would become easier for review and to see if there is any better approach as well, This is also one of the reasons for keeping this as WIP and also adding UT with only happy paths.

@Shilpa-Gokul Shilpa-Gokul force-pushed the add-listener branch 2 times, most recently from dc01447 to ac508e0 Compare March 27, 2025 06:01
@Shilpa-Gokul Shilpa-Gokul requested a review from Karthik-K-N April 2, 2025 08:41
@Shilpa-Gokul Shilpa-Gokul changed the title [WIP]: Add listener based on the machine label and listener label Add listener based on the machine label and listener label Apr 3, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2025
@Amulyam24
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 3, 2025
@Shilpa-Gokul Shilpa-Gokul force-pushed the add-listener branch 3 times, most recently from 5f06b18 to 7fbcc75 Compare April 3, 2025 14:31
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 8, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2025
@Shilpa-Gokul Shilpa-Gokul force-pushed the add-listener branch 2 times, most recently from 48f0f88 to ee91bfe Compare April 11, 2025 12:59
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Few small things, Otherwise LGTM

/assign @Amulyam24 @Prajyot-Parab

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@Amulyam24
Copy link
Contributor

/retest

Copy link
Contributor

@Amulyam24 Amulyam24 left a comment

Choose a reason for hiding this comment

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

/lgtm

Thank you @Shilpa-Gokul for continued effort on this feature!

Hope you have validated the changes by cluster creation.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 7, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 7, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@Shilpa-Gokul
Copy link
Contributor Author

/hold
@Amulyam24 With the latest changes, I'm yet to validate the cluster creation. Will test once again and confirm

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2025
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Please add the release notes as well.

Thank you for working on this feature, It was a tough one and took more discussion and time than anticipated.

@Shilpa-Gokul Shilpa-Gokul force-pushed the add-listener branch 2 times, most recently from 106e5c3 to 6b1a4e4 Compare May 16, 2025 05:26
@Shilpa-Gokul
Copy link
Contributor Author

Thanks @Karthik-K-N and @Amulyam24 for helping me with ideas for this feature.
I have validated the cluster creation with the latest changes, please review it once again.

@Shilpa-Gokul Shilpa-Gokul force-pushed the add-listener branch 2 times, most recently from 4e5d252 to 1f759c2 Compare May 16, 2025 11:28
@Shilpa-Gokul Shilpa-Gokul requested a review from Karthik-K-N May 22, 2025 05:22
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Most of the things LGTM
/assign @Amulyam24 @Prajyot-Parab

}
if additionalListener, ok := lbAdditionalListeners[fmt.Sprintf("%d-%s", *loadBalancerListener.Port, *loadBalancerListener.Protocol)]; ok {
if loadBalancerListener.DefaultPool != nil {
loadBalancerListeners[*loadBalancerListener.DefaultPool.Name] = additionalListener
Copy link
Contributor

Choose a reason for hiding this comment

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

@Shilpa-Gokul @Karthik-K-N , one question here, the AdditionalListener in Spec has DefaultPoolName field, is it not possible to populate the field somehow and use the value here?

I'm unable to recall if the pool name follows a unique pattern when it is created

Copy link
Contributor

Choose a reason for hiding this comment

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

I think currently that field is never considered, also we expects spec to be set by user and not to alter from controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add way to specify only bootstrap VM should be added to listener pool
6 participants