feat: Remove the urllib3 pinning #2461
Open
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
/kind regression
What this PR does / why we need it:
Pull Request Description
The PR removes the version pinning for the urllib3 library.
Background
Starting with
urllib3
version2.4.0
, stricter certificate validity checks were introduced when running on Python 3.13+ (urllib3#3571).This change can trigger errors such as:
These errors occur only in environments where Kubernetes clusters are configured with invalid or incomplete certificates, most notably on AWS EKS clusters created with Kubernetes v1.16 and earlier.
Change
We are not pinning the
urllib3
version. Instead, we keep the dependency flexible (optionally with a temporary upper bound if strictly necessary), ensuring compatibility with future versions ofurllib3
.Rationale / Why not pin the version
📦 Avoid unnecessary technical debt
Pinning a widely used core dependency like
urllib3
can quickly lead to upgrade blockers and complicate maintenance down the line.🔐 Don’t block important security updates
urllib3
is a critical dependency for HTTPS communication. Pinning could delay or prevent applying security patches or other improvements.🧹 The issue only affects outdated infrastructure
The certificate verification error occurs exclusively on clusters with invalid or outdated certificates. These environments should be updated rather than forcing the dependency to remain outdated.
🧭 Fixing the root cause is better than downstream workarounds
It’s more sustainable to address the infrastructure issue (fixing or rotating cluster certificates) than holding back modern library versions.
⚡ Keeps upgrade paths open
By not pinning the version, we can easily adopt future
urllib3
releases without major dependency refactors.Recommendation for affected users
If this error occurs, the correct fix is to update or properly configure the Kubernetes cluster certificates. A temporary upper bound may be set in local deployments if an immediate infrastructure fix is not feasible.
✅ Summary:
Instead of pinning
urllib3
to a specific version, we keep the dependency flexible and address the underlying infrastructure issue.This approach is more secure, easier to maintain, and aligned with dependency management best practices.
Special notes for your reviewer:
Does this PR introduce a user-facing change?