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(transparent-proxy): prioritize IPv4 executables initialization #11207

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

bartsmykla
Copy link
Contributor

Improve IP-related initialization by first setting up IPv4 executables to determine the iptables type (nft or legacy). IPv6 initialization now occurs only if IPFamilyMode is set to DualStack, an IPv6 local address exists, and adding the ::6 address succeeds. This approach prevents failures in environments like Minikube, where nft is unavailable and IPv6 is unsupported, ensuring the correct selection of executables without errors.

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues
    • No relevant links
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS
    • It won't
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Manually tested + all transparent proxy tests are passing
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md?
    • There is no need
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)
    • There is no need

Improve IP-related initialization by first setting up IPv4 executables
to determine the iptables type (nft or legacy). IPv6 initialization now
occurs only if IPFamilyMode is set to DualStack, an IPv6 local address
exists, and adding the `::6` address succeeds. This approach prevents
failures in environments like Minikube, where nft is unavailable and
IPv6 is unsupported, ensuring the correct selection of executables
without errors

Signed-off-by: Bart Smykla <[email protected]>
@bartsmykla bartsmykla added ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) ci/force-publish PR: push artifacts even if we're on a PR (use very carefully) labels Aug 26, 2024
@bartsmykla bartsmykla requested a review from a team as a code owner August 26, 2024 11:53
@bartsmykla bartsmykla requested review from jijiechen and removed request for a team August 26, 2024 11:53
Copy link
Contributor

@michaelbeaumont michaelbeaumont left a comment

Choose a reason for hiding this comment

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

Works for me

@bartsmykla bartsmykla enabled auto-merge (squash) August 26, 2024 13:55
@bartsmykla bartsmykla merged commit 534de7f into master Aug 26, 2024
46 checks passed
@bartsmykla bartsmykla deleted the fix/transparent-proxy-find-executables-logic branch August 26, 2024 14:00
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/force-publish PR: push artifacts even if we're on a PR (use very carefully) ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants