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

fix(kuma-cp): specifying IPv6 Envoy Admin address breaks readiness/liveness probes #7909

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

lobkovilya
Copy link
Contributor

@lobkovilya lobkovilya commented Sep 28, 2023

Today there is a possibility to change the Envoy Admin address to ::1 but admin_proxy_generator.go generates an admin cluster always with a 127.0.0.1 address.

This PR puts a specified admin address to proxy metadata and uses it when generating an admin cluster.

Checklist prior to review

@cbugneac-nex
Copy link

Hi @lobkovilya should we also mention that kuma-sidecar (kuma-dp) also needs to bind to IPv6 or this is for a separate PR ?

@lobkovilya
Copy link
Contributor Author

Hi, kuma-sidecar is binding to the data plane proxy inbound address as you can see here (g.getAddress(proxy) returns it):

listener, err := envoy_listeners.NewInboundListenerBuilder(proxy.APIVersion, g.getAddress(proxy), adminPort, core_xds.SocketAddressProtocolTCP).
.

And I believe we already have IPv6 support for DPP inbounds, so it should work. The only issue here was using 127.0.0.1 in the envoy admin cluster and this PR changes this to take the address from the proxy's metadata.

@lobkovilya lobkovilya changed the title fix(kuma-cp): add support for ipv6 loopback addr for envoy admin fix(kuma-cp): specifying IPv6 Envoy Admin address breaks readiness/liveness probes Sep 29, 2023
@lobkovilya lobkovilya marked this pull request as ready for review September 29, 2023 10:30
@lobkovilya lobkovilya requested a review from a team as a code owner September 29, 2023 10:30
@lobkovilya lobkovilya requested review from michaelbeaumont and jakubdyszkiewicz and removed request for a team September 29, 2023 10:30
@lobkovilya lobkovilya merged commit 8481ec2 into kumahq:master Sep 29, 2023
@lobkovilya lobkovilya deleted the fix/envoy-admin-ipv6 branch September 29, 2023 14:50
@github-actions
Copy link
Contributor

github-actions bot commented Sep 29, 2023

backporting to release-2.1 with action

backporting to release-2.3 with action
backporting to release-2.4 with action
backporting to release-2.0 with action

kumahq bot pushed a commit that referenced this pull request Sep 29, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
kumahq bot pushed a commit that referenced this pull request Sep 29, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
kumahq bot pushed a commit that referenced this pull request Sep 29, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
kumahq bot pushed a commit that referenced this pull request Sep 29, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
kumahq bot pushed a commit that referenced this pull request Sep 29, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
@lahabana
Copy link
Contributor

Couple of questions:

  • what happens in dual stack?
  • could we have not added an e2e test to make sure it works on both ipv4 and ipv6 in real life setups?

michaelbeaumont added a commit that referenced this pull request Oct 2, 2023
…veness probes (backport of #7909) (#7929)

* fix(kuma-cp): specifying IPv6 Envoy Admin address breaks readiness/liveness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

* test: fix flaky test
* chore(kuma-cp): improve error message for invalid admin addresses

Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Ilya Lobkov <[email protected]>
Co-authored-by: Mike Beaumont <[email protected]>
@lobkovilya
Copy link
Contributor Author

what happens in dual stack?

Envoy binds to 127.0.0.1 by default, so dual stack worked well before this PR.

could we have not added an e2e test to make sure it works on both ipv4 and ipv6 in real life setups?

I'm not sure if we need a dedicated e2e test for this, but I can change one Zone CP when running kindipv6 to have:

KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_WAIT_FOR_DATAPLANE_READY: "true"
KUMA_BOOTSTRAP_SERVER_PARAMS_ADMIN_ADDRESS: "::1"

that way we can ensure these features are tested.

@cbugneac-nex
Copy link

Apologies, will this change be included in the next release, e.g. 2.4.2 ?

@michaelbeaumont
Copy link
Contributor

michaelbeaumont commented Oct 2, 2023

@cbugneac-nex Yes: https://github.com/kumahq/kuma/tree/release-2.4

@cbugneac-nex
Copy link

Thanks @michaelbeaumont Don't want to look pushy, but when release of 2.4.2 is planned to happen ?
Reason: I'm blocked now with #7849 and would like to plan my work when I can get back to it.

@lahabana
Copy link
Contributor

lahabana commented Oct 2, 2023

I like this option of using ::1 for our ipv6 tests yes @lobkovilya !

lobkovilya added a commit that referenced this pull request Oct 3, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
lobkovilya added a commit that referenced this pull request Oct 3, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
lobkovilya added a commit that referenced this pull request Oct 3, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
lobkovilya added a commit that referenced this pull request Oct 3, 2023
…veness probes (#7909)

Put a specified admin address to proxy metadata and use it when generating an admin cluster.

Signed-off-by: Ilya Lobkov <[email protected]>
lobkovilya pushed a commit that referenced this pull request Oct 4, 2023
…veness probes (backport of #7909) (#7927)

Automatic cherry-pick of #7909 for branch release-2.3

Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Mike Beaumont <[email protected]>
lobkovilya pushed a commit that referenced this pull request Oct 4, 2023
…veness probes (backport of #7909) (#7930)

Automatic cherry-pick of #7909 for branch release-2.0

Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Mike Beaumont <[email protected]>
michaelbeaumont added a commit that referenced this pull request Oct 5, 2023
…veness probes (backport of #7909) (#7928)

* fix(kuma-cp): specifying IPv6 Envoy Admin address breaks readiness/liveness probes (#7909)
Put a specified admin address to proxy metadata and use it when generating an admin cluster.
* test(unit): fix flaky "should return error when admin address is not allowed" test (#7933)
fix(kuma-cp): use SortedKeys function in error msg
* make SortedKeys generic
* chore(kuma-cp): improve error message for invalid admin addresses (#7934)
* update golden files

Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Ilya Lobkov <[email protected]>
Co-authored-by: Mike Beaumont <[email protected]>
michaelbeaumont added a commit that referenced this pull request Oct 5, 2023
…veness probes (backport of #7909) (#7926)

* fix(kuma-cp): specifying IPv6 Envoy Admin address breaks readiness/liveness probes (#7909)
Put a specified admin address to proxy metadata and use it when generating an admin cluster.
* test(unit): fix flaky "should return error when admin address is not allowed" test (#7933)
fix(kuma-cp): use SortedKeys function in error msg
* make SortedKeys generic
* chore(kuma-cp): improve error message for invalid admin addresses (#7934)
* update golden files

Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Ilya Lobkov <[email protected]>
Co-authored-by: Mike Beaumont <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wait For Dataplane Ready takes too long and times out at 3 minutes
4 participants