Skip to content

Conversation

@08volt
Copy link
Member

@08volt 08volt commented Aug 28, 2025

feat(l4): Enable L4 NetLB Regional Backend Services by default

This change introduces a feature flag --enable-l4-netlb-rbs-by-default to enable the use of L4 NetLB Regional Backend Services (RBS) by default for newly created L4 NetLB services, instead of relying on CCM as default implementation.

Changes:

  • Added EnableL4NetLBRBSByDefault field to ControllerContextConfig in pkg/context/context.go.
  • Added the --enable-l4-netlb-rbs-by-default boolean flag in pkg/flags/flags.go, defaulting to false.
  • Updated L4NetLBController in pkg/l4lb/l4netlbcontroller.go to use the EnableL4NetLBRBSByDefault setting from the context.
  • Modified isRBSBasedService logic to return true if the enableRBSDefault flag is set, in addition to existing checks (annotations, finalizers, existing FR).
  • Updated unit tests in pkg/l4lb/l4netlbcontroller_test.go to test the new default behavior.

This change allows clusters to default to using the more modern RBS for L4 NetLBs, while still allowing individual services to use the legacy instance-based backend services if explicitly setting the LoadBalancerClass spec in the Service.

#L4NetLB #RBS

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 08volt
Once this PR has been reviewed and has the lgtm label, please assign aojea for approval. 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

@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 Aug 28, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @08volt. Thanks for your PR.

I'm waiting for a kubernetes 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 28, 2025
@TortillaZHawaii
Copy link
Member

/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 Sep 1, 2025
@08volt
Copy link
Member Author

08volt commented Sep 2, 2025

/retest

},
{
desc: "Should detect RBS by default",
isRBSDefault: true,
Copy link
Member

Choose a reason for hiding this comment

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

What about other testcases? We need to check if this doesn't modify existing Target pool LBs. I think it might be easier to add expectRBSServiceWithDefault to existing testcases and run with flag "true" and "false"

Copy link
Member Author

Choose a reason for hiding this comment

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

I added those cases and added the check for ForwardingRule legacy in the controller code

Copy link
Member Author

Choose a reason for hiding this comment

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

@08volt 08volt force-pushed the rbs-default-flag branch 2 times, most recently from 6b43126 to 7c64a95 Compare September 9, 2025 13:12
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 8, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants