OCPBUGS-100332: fix(konnectivity): conditionally prefer IPv4 based on HCP network config [release-4.22] - #9191
Conversation
Single-stack IPv4 KubeVirt hosted clusters on dual-stack management clusters fail to reach external services (e.g. OAuth IDPs) because the konnectivity proxy resolver picks IPv6 addresses that are unreachable from the single-stack data plane. Instead of always preferring IPv4, detect the IP family from the HCP ServiceNetwork CIDRs and pass --prefer-ipv4 to the konnectivity proxy sidecars only when the hosted cluster is single-stack IPv4. This ensures dual-stack and IPv6-only HCPs are unaffected. The CPO sidecar injection auto-detects the network configuration via isSingleStackIPv4() and sets the flag automatically — no per-component manual configuration needed. Signed-off-by: Vimal Solanki <vsolanki@redhat.com>
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-100332, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-4.22 #9191 +/- ##
================================================
+ Coverage 36.22% 36.23% +0.01%
================================================
Files 774 774
Lines 94889 94950 +61
================================================
+ Hits 34374 34408 +34
- Misses 57699 57726 +27
Partials 2816 2816
🚀 New features to boost your workflow:
|
|
@vsolanki12: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-100332, which is invalid:
Comment DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-100332, which is invalid:
Comment DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-100332, which is valid. 7 validation(s) were run on this bug
DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, vsolanki12 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Backport of #9140 to release-4.22.
--prefer-ipv4flag to konnectivity HTTPS and SOCKS5 proxy containersConflict resolution
support/netutilpackage doesn't exist on release-4.22. Changednetutil.IsIPv4CIDRtoutil.IsIPv4CIDRwhich provides the same function on this branch.Test plan
go buildpasses for affected packagesgo vetcleansupport/konnectivityproxy