Skip to content
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

Support gateway service name in meshNetworks #13392

Merged
merged 8 commits into from May 18, 2019

Conversation

hzxuzhonghu
Copy link
Member

Continue working based on @ymesika 's work #12728

// when loading the config
if gwIP := net.ParseIP(gw.GetAddress()); gwIP != nil {
gwAddrs = []string{gw.GetAddress()}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

elseif: can replace 'else {if cond {}}' with 'else if cond {}' (from gocritic)

@@ -15,6 +15,7 @@
package v2

import (
"istio.io/istio/pilot/pkg/networking/core/v1alpha3/fakes"
Copy link
Contributor

Choose a reason for hiding this comment

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

File is not goimports-ed (from goimports)

pilot/pkg/proxy/envoy/v2/ep_filters_test.go Outdated Show resolved Hide resolved
@hzxuzhonghu
Copy link
Member Author

/assign @rshriram

@hzxuzhonghu
Copy link
Member Author

@rshriram any other comments?

@hzxuzhonghu
Copy link
Member Author

/cc @sdake

if len(ingress.IP) > 0 {
lbAddrs[i] = ingress.IP
} else if len(ingress.Hostname) > 0 {
lbAddrs[i] = ingress.Hostname
Copy link
Member

Choose a reason for hiding this comment

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

if you assign this mixed mode IP/hostname, it will break all EDS. An EDS cluster cannot have both ip and hostname

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

// address(es) to access the service from outside the cluster.
// Used by the aggregator to aggregate the Attributes.ExternalAddresses
// for clusters where the service resides
ExternalAddresses map[string][]string
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't matter what we cal this. This data structure here is an aggregation point. Its not the cleanest way to create this. Same applies to this ClusterVIPs that was created. Applicable to k8s, but it thoroughly confuses anybody else looking at the code to integrate it into their platform.

Move this into the service attribute, preferably under a map with key as k8s, within which you can do whatever you want, so that this logic does not leak into listeners/clusters, etc.

Also keep in mind that these new fields do not have a representation in the Service Entry. So what happens when Galley starts streaming service entries for all clusters? this will break badly. I suggest devising a more comprehensive solution.

Copy link
Member Author

Choose a reason for hiding this comment

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

when Galley starts streaming service entries for all clusters?

Is ServiceEntry the last choice? I donot think it is easy to transform platform specific service model to ServiceEntry. If it is me, I would stream istio service model and thus reuse the convert logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

@rshriram Is this still a blocker?

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, service entry is the format we are using to stream information from Galley to Pilot. So, you would have to figure out a way to make that work with service entry. May be through annotations, etc. and then translate into the service model. Hence my suggestion to stick this as attribute in service attributes

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, will take a look.

Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

EDS bug

pilot/pkg/proxy/envoy/v2/ep_filters_test.go Outdated Show resolved Hide resolved
pilot/pkg/serviceregistry/kube/conversion.go Outdated Show resolved Hide resolved
pilot/pkg/serviceregistry/kube/conversion_test.go Outdated Show resolved Hide resolved
pilot/pkg/serviceregistry/kube/conversion_test.go Outdated Show resolved Hide resolved
Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

/lgtm

@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu, rshriram

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hzxuzhonghu
Copy link
Member Author

/retest

@hzxuzhonghu
Copy link
Member Author

/test e2e-mixer-no_auth-master

@hzxuzhonghu
Copy link
Member Author

/retest

@hzxuzhonghu
Copy link
Member Author

/test e2e-mixer-no_auth-master

@istio-testing
Copy link
Collaborator

@hzxuzhonghu: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-integ-k8s-tests.sh cce0efc3cbeb5dea263d903abc67961217637d53 link /test istio-integ-k8s-tests
prow/integ-pilot-k8s-presubmit-tests.sh a935f03 link /test integ-pilot-k8s-presubmit-tests-master

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/test-infra repository. I understand the commands that are listed here.

@istio-testing istio-testing merged commit 01b7e48 into istio:master May 18, 2019
@hzxuzhonghu hzxuzhonghu deleted the gw-svc-name branch May 18, 2019 14:13
howardjohn added a commit to howardjohn/istio that referenced this pull request Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants