- 
                Notifications
    
You must be signed in to change notification settings  - Fork 316
 
WIP L3 NetLB experiment #2976
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
base: master
Are you sure you want to change the base?
WIP L3 NetLB experiment #2976
Conversation
| 
           Skipping CI for Draft Pull Request.  | 
    
| 
           [APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TortillaZHawaii 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   | 
    
| 
           /lint  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TortillaZHawaii: 2 warnings.
In response to this:
/lint
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.io/ingress-gce/pkg/flags" | ||
| ) | ||
| 
               | 
          ||
| const ExperimentAnnotation = "networking.gke.io/l3-experiment" | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Golint comments: exported const ExperimentAnnotation should have comment or be unexported. More info.
| 
               | 
          ||
| const ExperimentAnnotation = "networking.gke.io/l3-experiment" | ||
| 
               | 
          ||
| func Wants(svc *corev1.Service) bool { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Golint comments: exported function Wants should have comment or be unexported. More info.
There was a problem hiding this 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 pull request introduces experimental L3 NetLB support by adding logic to conditionally configure forwarding rules and backend services for L3 protocol when the service is annotated with the L3 experiment annotation.
- Adds L3 experiment annotation detection and enabling flag
 - Modifies backend service protocol selection to support L3
 - Updates forwarding rule creation to use L3 protocol and all ports when in L3 mode
 
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 | 
|---|---|
| pkg/loadbalancers/l3/wants.go | New file implementing L3 experiment detection logic | 
| pkg/flags/flags.go | Adds flag to enable L3 NetLB opt-in functionality | 
| pkg/loadbalancers/l4netlb.go | Refactors protocol selection and forwarding rule annotation handling | 
| pkg/loadbalancers/l4netlbipv6.go | Updates IPv6 firewall configuration for mixed protocol support | 
| pkg/loadbalancers/forwarding_rules.go | Modifies IPv4 forwarding rule creation for L3 support | 
| pkg/loadbalancers/forwarding_rules_ipv6.go | Modifies IPv6 forwarding rule creation for L3 support | 
| pkg/forwardingrules/equal.go | Improves string comparison using EqualFold | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if protocol == "" { | ||
| protocol = "UDP" | 
    
      
    
      Copilot
AI
    
    
    
      Sep 5, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded default protocol 'UDP' should be defined as a constant or sourced from the same location as other protocol constants to maintain consistency and avoid magic strings.
| if protocol == "" { | |
| protocol = "UDP" | |
| protocol = forwardingrules.ProtocolUDP | 
| 
               | 
          ||
| version := fr.IpVersion | ||
| if version == "" { | ||
| version = "IPV4" | 
    
      
    
      Copilot
AI
    
    
    
      Sep 5, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded default version 'IPV4' should be defined as a constant to avoid magic strings and improve maintainability.
dbbc214    to
    72a88d0      
    Compare
  
    | 
           /test-all  | 
    
72a88d0    to
    b792843      
    Compare
  
    | 
           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.  | 
    
No description provided.