-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add a firewall rule to open the LB health check and service port(s) when using service.beta.kubernetes.io/do-loadbalancer-type=REGIONAL_NETWORK
#748
Conversation
d6e5dbe
to
11f9467
Compare
…ice.beta.kubernetes.io/do-loadbalancer-type=REGIONAL_NETWORK`
11f9467
to
68a89fc
Compare
} else if svc.Spec.Type == v1.ServiceTypeLoadBalancer { | ||
lbType, err := getType(svc) | ||
if err != nil { | ||
return nil, err |
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.
Can we add fmt.Errorf()
around err
to provide context, specifically the name of the Service affected?
Similar for the error returned in line 323.
fwReq, err := fm.createReconciledFirewallRequest(test.serviceList) | ||
|
||
if (err != nil && test.expectedError == nil) || (err == nil && test.expectedError != nil) { | ||
t.Errorf("incorrect firewall config\nwant: %#v\n got: %#v", test.expectedError, err) |
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.
This should probably say
t.Fatalf("expected error %q, got %q", test.expectedError, err)
var nodePortInboundRules []godo.InboundRule | ||
healthCheckPorts := make(map[int]struct{}) | ||
for _, svc := range serviceList { | ||
managed, err := isManaged(svc) |
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.
We may need to scope the non-management restriction down to the NodePort logic while continuing to reconcile ports for NLBs.
Withdrawing approval for now so that we don't forget.
annotation to disable firewall management may still need re-scoping
…b dataplane to arrive on the worker nodes.
service.beta.kubernetes.io/do-loadbalancer-type=REGIONAL_NETWORK
service.beta.kubernetes.io/do-loadbalancer-type=REGIONAL_NETWORK
Since NLB will route traffic over the public interface for both the LB data plane and health checks, we will need to open the appropriate health check port. This change only affects LBs who set the annotation
service.beta.kubernetes.io/do-loadbalancer-type=REGIONAL_NETWORK
and the network isEXTERNAL
(default).