-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[feat:gw-api] add support for ServiceExternalTrafficPolicyLocal #4156
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
Hi @shuqz. 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 Once the patch is verified, the new status will be reflected by the 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. |
@@ -515,6 +542,12 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPath(targetGro | |||
return &builder.defaultHealthCheckPathGRPC | |||
} | |||
|
|||
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckPath == nil { | |||
if builder.loadBalancerType == elbv2model.LoadBalancerTypeNetwork && isServiceExternalTrafficPolicyTypeLocal { |
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.
nit: isServiceExternalTrafficPolicyTypeLocal will never be true for application lb, so you can drop the nlb check.
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckInterval == nil { | ||
return builder.defaultHealthCheckInterval | ||
return map[bool]int32{ |
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.
interesting pattern :)
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.
I was expecting this to as a new property in the TG config to fit the pattern of defining TG attributes in that CRD. But I think this is ok, and it's not a one-way door. We can add the TG prop at a later time.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shuqz, zac-nixon 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 |
/ok-to-test |
Issue
Description
add support for ServiceExternalTrafficPolicyLocal when ExternalTrafficPolicy is defined in Service Spec for NLB. To have default value for Local case, it needs to satisfy:
Checklist
README.md
, or thedocs
directory)externalTrafficPolicy: Cluster
-> no difference, this is the default caseexternalTrafficPolicy: Local
and not specify healthCheckNodePort -> random number(range 30000-32767) is chosen for health check node port and other default values are takenexternalTrafficPolicy: Local
and specify healthCheckNodePort -> healthCheckNodePort is chosen for health check node port and other default values are takenexternalTrafficPolicy: Local
and specify healthCheckNodePort and under Type:NodePort -> get error " spec.healthCheckNodePort: Invalid value: 30001: may only be set whentype
is 'LoadBalancer' andexternalTrafficPolicy
is 'Local'"BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯