Skip to content

Conversation

zhlsunshine
Copy link
Contributor

@zhlsunshine zhlsunshine commented Aug 24, 2022

Please provide a description of this PR:
Add extra addresses for listeners configuration to support dual stack in Istio, this PR is part of issue#40394

This PR just focus on normal k8s service in service mesh, and add the additional addresses for specified listener of service. There fore, it does not include below:

  1. No code change for service entry
  2. No code change for statefulsets/headless services with TCP ports, and empty service address field (There is another PR for this: wip: experimental with single listener for headless #40409)
  3. No code change for gateway listener configuration

Below snapshots are test results and the attach contains the whole configdump file exclude eds via curl localhost:15000/config_dump

Inbound listener additional addresses:
inbound

Outbound listener additional addresses:
outbound

Application/Service listener additional addresses:
application_service

Config dump:
extra_addresses_configdump.log

Note: I did not add any test case and I will add necessary test case after all the business code changes are available for reviewers.

@zhlsunshine zhlsunshine requested a review from a team as a code owner August 24, 2022 13:58
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 24, 2022
@zhlsunshine zhlsunshine added the release-notes-none Indicates a PR that does not require release notes. label Aug 24, 2022
@jacob-delgado
Copy link
Contributor

jacob-delgado commented Aug 24, 2022

cc @adams-shaun can you help us review this? Do you have any ideas for how we can add tests to this?

Copy link
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

Conceptually looks good. I think the way the code is structured right now makes it very error prone for use, I think we need to work on cleaning it up a bit.


// Build the "virtual" inbound listener. This will capture all inbound redirected traffic and contains:
// * Passthrough filter chains, matching all unmatched traffic. There are a few of these to handle all cases
// * Service filter chains. These will either be for each Port exposed by a Service OR Sidecar.Ingress configuration.
allChains := buildInboundPassthroughChains(lb)
allChains = append(allChains, chains...)
return lb.buildInboundListener(model.VirtualInboundListenerName, util.BuildAddress(actualWildcard, ProxyInboundListenPort), false, allChains)
l := lb.buildInboundListener(model.VirtualInboundListenerName, util.BuildAddress(actualWildcard, ProxyInboundListenPort), false, allChains)
Copy link
Member

Choose a reason for hiding this comment

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

should we do this in buildInboundListener?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @howardjohn, I think it's better to separate the default service and extra service address, because 1. no change for buildInboundListener ; 2. no impact for single stack logic; 3. Extra service address should be added separately, because it's not just for dual stack, it may be used for other in future. Any idea?

extraAddress := &listener.AdditionalAddress{
Address: util.BuildAddress(exbd, uint32(opts.port.Port)),
}
res.AdditionalAddresses = append(res.AdditionalAddresses, extraAddress)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a check for Envoy version, this field is new? Or its already in 1.15 and this PR will only be in 1.16?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @howardjohn, yes, AdditionalAddresses is a new field. And yes, but how about to check the Istio version?
BTW, when I execute cmd: make build it's okay with the new field of AdditionalAddresses, but when I execute cmd make test, there are errors message like below:

{Failed      listener_builder_test.go:79: listener 127.0.0.1_15007 is invalid: invalid Listener.AdditionalAddresses[0]: embedded message failed validation | caused by: invalid AdditionalAddress.Address: embedded message failed validation | caused by: invalid Address.SocketAddress: embedded message failed validation | caused by: invalid SocketAddress.Address: value length must be at least 1 runes}

So I think make build or make test have different dependency libs version for github.com/envoyproxy/go-control-plane/envoy/config/listener/v3 Any idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new function named IsIstioVersionGE116 to make sure that the field of AdditionalAddresses can be added if istioctl version is greater or equal 1.16.

Copy link
Contributor

Choose a reason for hiding this comment

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

You need go.mod updated to use envoyproxy/go-control-plane@2cb7986

Try running `go get github.com/envoyproxy/go@2cb7986b23ccfde4a77c26ebf3bfbfa71126fafd for your PR.

I have a PR to update the to a version of go.mod, but it's failing due to other reasons.

Copy link
Contributor

Choose a reason for hiding this comment

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

It appears that updating the api is also blocked on envoyproxy/envoy#22804 as definitions were removed that Istio relies on for other features. Maybe you can get Alex to help you Steve to get it pushed through Envoy. This is blocking Istio as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @jacob-delgado, thanks, this error has been fixed!

// if it's dual stack environment
if bindAddress != "" && exBindAddresses != "" {
cc.bind = bindAddress
cc.exBind = []string{exBindAddresses}
Copy link
Member

Choose a reason for hiding this comment

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

IIRC before in dual stack we made 2 listeners. Now are we creating 2 listeners with 2 addresses each? Or did e remove the 2 listeners somewhere I missed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @howardjohn, according to original solution, there are 2 listeners for a service with both IPv4 and IPv6 addresses. For current solution, there is only 1 listener and there are address and additional addresses (new field) for it. The former is for the first address of the service, and the latter is for the rest addresses of the service.

@zhlsunshine zhlsunshine requested a review from a team as a code owner August 29, 2022 07:28
@istio-testing istio-testing added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 30, 2022
@hzxuzhonghu
Copy link
Member

cc @hzxuzhonghu @ramaraochavali

@istio-testing istio-testing added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 30, 2022
@zhlsunshine
Copy link
Contributor Author

Hi @howardjohn, @hzxuzhonghu and @ramaraochavali , I added the unit test and fixed the issues. And here is the new configdump file
new_extra_addresses_configdump.log

bind := egressListener.IstioListener.Bind
var bind string
var extraBind []string
bind = egressListener.IstioListener.Bind
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bind = egressListener.IstioListener.Bind
bind := egressListener.IstioListener.Bind

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, done!

// and make sure that it's necessary to add the extra addresses, such as it's a dual stack env
if actualLocalHostAddrIPv6 != "" {
if bind == actualLocalHostAddrIPv4 {
listenerOpts.extraBind = []string{actualLocalHostAddrIPv6}
Copy link
Member

Choose a reason for hiding this comment

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

do we want to make bind and extraBind? Should we just have bind be a list and we automatically make them "extra"?

In envoy, is there any difference between the primary address and the "extra" addresses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we want to make bind and extraBind? Should we just have bind be a list and we automatically make them "extra"?

In envoy, is there any difference between the primary address and the "extra" addresses?

Hi @howardjohn, as discussing in previous PR, ClusterVIPs can holds all IP instances which is available both for bind and extraBind.

Yes, according to the issue envoyproxy/envoy#11184 in envoy, additinal_addresses can hold all other IP instances for one specified listener, except the primary one. And here is the API definition for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@howardjohn For example, if there are 2 IP instances ["127.0.0.1", "::1"], then the primary address should be 127.0.0.1, and the extra addresses should be [::1]

Copy link
Member

Choose a reason for hiding this comment

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

I get that's how it's implemented but my question is why? Do we really need to carry around a "address" and "extra addresses" or just a list of addresses and stick a random one as the main on in envoy config?

My concern with this PR, as noted before, is not the generates XDS but the large complexity we are adding to the code for something relatively simple, and lack of integration tests.

If we need all of these complex if statements and juggling around 4 address (localhost + wildcard x v4 v6) it's complex and error prone. Maybe this logic can be factored out into a struct, etc

Copy link
Contributor Author

@zhlsunshine zhlsunshine Sep 5, 2022

Choose a reason for hiding this comment

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

Hi @howardjohn, how about to factor the extra addresses adding logic into the function of structs buildListenerOpts and inboundChainConfig, then the similar if statements, such as if len(cc.extraBind) > 0 && util.IsIstioVersionGE116(lb.node.IstioVersion) will be eliminated.
For integration test, the dual stack integration test will be added by @jacob-delgado

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get that's how it's implemented but my question is why? Do we really need to carry around a "address" and "extra addresses" or just a list of addresses and stick a random one as the main on in envoy config?
Hi @howardjohn, for this part, current solution has the similar implementation with the API definition of envoy: one primary address and some extra addresses. So it should be more reasonable.

Copy link
Member

Choose a reason for hiding this comment

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

We don't need to make all of our code much more complex just because envoy has a weird API, imo. We should pick the right API for our usage and then translate it to envoy as needed

Copy link
Member

Choose a reason for hiding this comment

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

Integration tests are an expectation for all features in Istio; please have them alongside the PR instead of afterwards. We can wait. If you want to merge without integration tests it can be done in the experimental branch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need to make all of our code much more complex just because envoy has a weird API, imo. We should pick the right API for our usage and then translate it to envoy as needed

Sure, agree with this idea, I will make the code as simple as possible, then re-submit it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Integration tests are an expectation for all features in Istio; please have them alongside the PR instead of afterwards. We can wait. If you want to merge without integration tests it can be done in the experimental branch

@howardjohn Sure, I will add integration tests for this feature, and make sure the additional_addresses can be correctly added. Thanks for the comment here.

@istio-testing istio-testing added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 5, 2022
@zhlsunshine
Copy link
Contributor Author

Hi @howardjohn, could you please help to approve this PR if it's okay? Thanks! ^_^

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

Do we have integration test which has dual nics?

@zhlsunshine
Copy link
Contributor Author

Do we have integration test which has dual nics?

Hi @hzxuzhonghu , that's a good question, in fact @jacob-delgado is focusing on building the integration test environment for dual stack.

@howardjohn
Copy link
Member

The kb/msg metric is concerning:

name                                              old kb/msg         new kb/msg         delta
pkg:istio.io/istio/pilot/pkg/xds goos:linux goarch:amd64
RouteGeneration/gateways-8                               1.16k ± 0%         1.16k ± 0%      ~     (all equal)
RouteGeneration/gateways-shared-8                        5.37k ± 0%         5.37k ± 0%      ~     (all equal)
RouteGeneration/empty-8                                   38.9 ± 0%          77.8 ± 0%   +99.77%  (p=0.008 n=5+5)
RouteGeneration/tls-8                                     38.9 ± 0%          77.8 ± 0%   +99.77%  (p=0.008 n=5+5)
RouteGeneration/telemetry-8                               38.9 ± 0%          77.8 ± 0%   +99.77%  (p=0.008 n=5+5)
RouteGeneration/telemetry-api-8                           38.9 ± 0%          77.8 ± 0%   +99.77%  (p=0.008 n=5+5)
RouteGeneration/virtualservice-8                          96.6 ± 0%          96.6 ± 0%      ~     (all equal)
RouteGeneration/authorizationpolicy-8                     0.41 ± 0%          0.41 ± 0%      ~     (all equal)
RouteGeneration/peerauthentication-8                      0.41 ± 0%          0.41 ± 0%      ~     (all equal)
RouteGeneration/knative-gateway-8                          258 ± 0%           258 ± 0%      ~     (all equal)
RouteGeneration/serviceentry-workloadentry-8              38.9 ± 0%          77.8 ± 0%   +99.77%  (p=0.008 n=5+5)
ClusterGeneration/gateways-8                               429 ± 0%           429 ± 0%      ~     (all equal)
ClusterGeneration/gateways-shared-8                        429 ± 0%           429 ± 0%      ~     (all equal)
ClusterGeneration/empty-8                                  375 ± 0%           376 ± 0%    +0.08%  (p=0.008 n=5+5)
ClusterGeneration/tls-8                                    337 ± 0%           338 ± 0%    +0.09%  (p=0.008 n=5+5)
ClusterGeneration/telemetry-8                              188 ± 0%           189 ± 0%    +0.11%  (p=0.008 n=5+5)
ClusterGeneration/telemetry-api-8                          188 ± 0%           189 ± 0%    +0.11%  (p=0.008 n=5+5)
ClusterGeneration/virtualservice-8                        43.4 ± 0%          43.6 ± 0%    +0.58%  (p=0.008 n=5+5)
ClusterGeneration/authorizationpolicy-8                   1.49 ± 0%          1.75 ± 0%   +16.96%  (p=0.008 n=5+5)
ClusterGeneration/peerauthentication-8                    1.49 ± 0%          1.75 ± 0%   +16.96%  (p=0.008 n=5+5)
ClusterGeneration/knative-gateway-8                       1.13 ± 0%          1.13 ± 0%      ~     (all equal)
ClusterGeneration/serviceentry-workloadentry-8             395 ± 0%           395 ± 0%    +0.08%  (p=0.008 n=5+5)
ListenerGeneration/gateways-8                            2.09k ± 0%         2.10k ± 0%    +0.29%  (p=0.008 n=5+5)
ListenerGeneration/gateways-shared-8                      4.00 ± 0%          4.03 ± 0%    +0.75%  (p=0.008 n=5+5)
ListenerGeneration/empty-8                                18.5 ± 0%          46.6 ± 0%  +152.41%  (p=0.008 n=5+5)
ListenerGeneration/tls-8                                  12.6 ± 0%          38.2 ± 0%  +202.54%  (p=0.008 n=5+5)
ListenerGeneration/telemetry-8                            29.1 ± 0%         108.1 ± 0%  +271.48%  (p=0.008 n=5+5)
ListenerGeneration/telemetry-api-8                        54.7 ± 0%         232.4 ± 0%  +325.10%  (p=0.008 n=5+5)
ListenerGeneration/virtualservice-8                       7.32 ± 0%         13.16 ± 0%   +79.90%  (p=0.008 n=5+5)
ListenerGeneration/authorizationpolicy-8                  56.4 ± 0%         109.9 ± 0%   +95.00%  (p=0.008 n=5+5)
ListenerGeneration/peerauthentication-8                   6.41 ± 0%          9.83 ± 0%   +53.45%  (p=0.008 n=5+5)
ListenerGeneration/knative-gateway-8                      3.56 ± 0%          3.59 ± 0%    +0.84%  (p=0.008 n=5+5)
ListenerGeneration/serviceentry-workloadentry-8           18.5 ± 0%          46.6 ± 0%  +152.41%  (p=0.008 n=5+5)

Why are we seeing such a huge increase in config size?

@zhlsunshine
Copy link
Contributor Author

Hi @howardjohn, thanks for your comparison above, then I see now. and I also checked the comparison between1557747988594429952 by ramaraochavali at Aug 11 23:17:51 and 1572987049097564160 by howardjohn at Sep 23 00:37:35.
As you commented here: #40634 (comment), I think you are correct that DiscoverIPMode called in pilot/pkg/xds/bench_test.go causes such huge increase in config size.
Moreover, I also checked the comparison between 1572987049097564160 by howardjohn at Sep 23 00:37:35 and 1573129384842235904 by zhlsunshine at Sep 23 09:58:00, there is no huge increase for them.

According to current analysis, this PR does not cause the increasing in configuration size if it drops the bech_test's DiscoverIPMode calling. However, in fact, it confused me that DiscoverIPMode calling causes such huge increase in configuration size. You know it just sets the IP mode and GlobalUnicastIP of the proxy.

@howardjohn
Copy link
Member

/test benchmark

wcLh.localHostIPv4 = LocalhostAddress
wcLh.localHostIPv6 = LocalhostIPv6Address
default:
panic("Unknow IP mode")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
panic("Unknow IP mode")
panic("Unknown IP mode")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

bind := egressListener.IstioListener.Bind
if bind == "" {
if bindToPort {
bind = actualLocalHostAddress
bind = actualLocalHosts[0]
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need extraBind at all? Instead of bind being a list?

I am very worried that somewhere else we will assume there is one bind and mutate it.

For example:

bind := 127.0.0.1
extraBind := ::1
... lot of code later ..
bind = SomeOtherIp // Oops! forgot to change extrabind!

Comment on lines 400 to 404
bindToPort: bindToPort,
}
if len(extraBind) > 0 {
listenerOpts.extraBind = append(listenerOpts.extraBind, extraBind...)
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bindToPort: bindToPort,
}
if len(extraBind) > 0 {
listenerOpts.extraBind = append(listenerOpts.extraBind, extraBind...)
}
bindToPort: bindToPort,
extraBind: extraBind,
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

}
return
}
log.Warnf("warning: No extra addresses need to be added to listener [%s]", ll.Name)
Copy link
Member

Choose a reason for hiding this comment

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

Remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@istio-testing istio-testing added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 28, 2022
Copy link
Contributor

@ramaraochavali ramaraochavali left a comment

Choose a reason for hiding this comment

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

Generally LGTM. Couple of nits. Still not clear what is the issue with bench marks though

// wildCardIPs contains the wildcard host IPs, including IPv4 and IPv6
wildCardIPs []string

// localHostIPs contains the wildcard host IPs, including IPv4 and IPv6
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: localHostIPs contains the local host IPs,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

bind := egressListener.IstioListener.Bind
if bind == "" {
if bindToPort {
bind = actualLocalHostAddress
bind = actualLocalHosts[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

can you please add a comment on why we are using bind = actualLocalHosts[0]?

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

One question, when user specify Bind explicitly, will we add additional Bind now?

}
node.GlobalUnicastIP = networkutil.GlobalUnicastIP(node.IPAddresses)
node.wildCardIPs = wildCardIPs
node.localHostIPs = localHostIPs
Copy link
Member

Choose a reason for hiding this comment

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

I donot feel very comfortable caching same or limited number of strings per proxy. From memory view, this is not friendly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @hzxuzhonghu, in fact they are not caching same, the content for wildCardIPs and localHostIPs depends on the service deployment, it can be, for example to localHostIPs, ["127.0.0.1"], ["::1"] or ["127.0.0.1", "::1"].

BTW,

  1. if not store them in proxy, then Istio must calculate them,
  2. if not calculate them, then must store them
    One of them should be choose.

Copy link
Contributor Author

@zhlsunshine zhlsunshine Sep 29, 2022

Choose a reason for hiding this comment

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

Hi @hzxuzhonghu, use 2 map to maintain wildCardIPs and localHostIPs now

// Wildcards returns the wildCard IP addresses for current proxy
func (node *Proxy) Wildcards() []string {
if len(node.wildCardIPs) == 0 {
node.DiscoverIPMode()
Copy link
Member

Choose a reason for hiding this comment

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

no call it every, this can be called in init proxy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @hzxuzhonghu, yeah, DiscoverIPMode would be called one time if len(node.wildCardIPs) == 0 or len(node.localHosts) == 0.
In fact, I'm afraid that DiscoverIPMode is not called, so just in case. Do you suggest that remove the calling in both Wildcards() and Localhosts()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed!

bind = actualWildcards[0]
if len(actualWildcards) > 1 {
extraBind = actualWildcards[1:]
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can we cache the result of bind and extraBind or quickly inferred somewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @hzxuzhonghu, I think this may be the same as above answer of mine.

@@ -389,12 +401,13 @@ func (lb *ListenerBuilder) buildSidecarOutboundListeners(node *model.Proxy,
bind: bind,
port: listenPort,
bindToPort: bindToPort,
extraBind: extraBind,
Copy link
Member

Choose a reason for hiding this comment

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

how about additionalBind

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the extraBind will be translated into additional addresses for listener in later.

@@ -173,6 +173,22 @@ func BuildAddress(bind string, port uint32) *core.Address {
}
}

// BuildExtraAddresses can add extra addresses to additional addresses for a listener
func BuildExtraAddresses(extrAddresses []string, listenPort uint32, ll *listener.Listener, node *model.Proxy) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggest moving listener param here, this function should be simple

listener.AdditionalAddresses = BuildExtraAddresses()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, I understand, generate the additional addresses in BuildExtraAddresses and remove the listener parameter, then specify as listener.AdditionalAddresses = BuildExtraAddresses()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@zhlsunshine
Copy link
Contributor Author

One question, when user specify Bind explicitly, will we add additional Bind now?

Hi @hzxuzhonghu, what do you mean specify Bind explicitly? the additional bind is added when istio service has more than one addresses.

@hzxuzhonghu
Copy link
Member

Not sure this is right in this case

@zhlsunshine
Copy link
Contributor Author

zhlsunshine commented Sep 29, 2022

Not sure this is right in this case

Hi @hzxuzhonghu, I re-submitted, PTAL, thanks for your comments! ^_^

@zhlsunshine
Copy link
Contributor Author

/test integ-security-multicluster

@zhlsunshine
Copy link
Contributor Author

Hi @hzxuzhonghu, re-submitted, maintain 2 maps to fetch host addresses according to proxy’s IP mode. Thanks for your comments! ^_^

@@ -173,6 +173,23 @@ func BuildAddress(bind string, port uint32) *core.Address {
}
}

// BuildExtraAddresses can add extra addresses to additional addresses for a listener
func BuildExtraAddresses(extrAddresses []string, listenPort uint32, node *model.Proxy) []*listener.AdditionalAddress {
Copy link
Member

Choose a reason for hiding this comment

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

replace Extra with Additional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, no problem!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants