-
Notifications
You must be signed in to change notification settings - Fork 83
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
MESH-6019 : Make ingress gateway selection consistent. #376
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #376 +/- ##
==========================================
- Coverage 77.22% 77.22% -0.01%
==========================================
Files 75 75
Lines 10417 10420 +3
==========================================
+ Hits 8045 8047 +2
+ Misses 1963 1958 -5
- Partials 409 415 +6 ☔ View full report in Codecov by Sentry. |
} else { | ||
return false | ||
} |
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.
nitpick, we can remove this else
block and just return false
func IsIstioIngressGatewayService(svc *k8sV1.Service, key string) bool { | ||
|
||
if svc != nil && len(svc.Labels) > 0 { | ||
//return svc.Namespace == NamespaceIstioSystem && svc.Labels["app"] == GetAdmiralParams().LabelSet.GatewayApp |
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 remove this comment?
@@ -188,7 +188,8 @@ func (s *serviceCache) GetLoadBalancer(key string, namespace string) (string, in | |||
return lb, 0 | |||
} | |||
for _, service := range services { | |||
if service.Labels["app"] == key { | |||
if common.IsIstioIngressGatewayService(service, key) { | |||
//if service.Labels["app"] == key { |
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 remove this comment?
ingressEndpoint, port := getIngressEndpointAndPort(rc) | ||
ingressEndpoint, port := rc.ServiceController.Cache.GetLoadBalancer(common.GetAdmiralParams().LabelSet.GatewayApp, common.NamespaceIstioSystem) |
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.
any reason we pulled the code out of the func?
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.
No place is using that except this place.
Plan to clean up that method as well. Also func is not doing anything part from sending same thing.
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: vtiwari5 <[email protected]> Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: vtiwari5 <[email protected]> Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: vtiwari5 <[email protected]> Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Checklist
🚨 Please review this repository's contribution guidelines.
Description
Currently admiral load ingress gateway via two point and two different selector getting used.
Moving this only label selector.
Thank you!