-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Bump k8s.io/api, k8s.io/client-go, k8s.io/apimachinery from 0.22.7 to 0.23.6 #6037
Conversation
ad39ed2
to
477a0e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR! I'm not against bumping these versions if it's helpful. I restarted the build to see if it will pass, but left a question about the exclude
directive.
@@ -312,3 +314,5 @@ replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0- | |||
replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211126105533-c5505f5eaa7d | |||
|
|||
replace github.com/cloudflare/cloudflare-go => github.com/cyriltovena/cloudflare-go v0.27.1-0.20211118103540-ff77400bcb93 | |||
|
|||
exclude k8s.io/client-go v8.0.0+incompatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to understand this exclude
directive -- can you help me understand what it helps with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding exclude k8s.io/client-go v8.0.0+incompatible
helps to keep version of github.com/influxdata/telegraf v1.16.3.
When I upgrade k8s.io/client-go to v0.23.6, go downgrades github.com/influxdata/telegraf to v0.10.1. When I upgrade telegraf back to v1.16.3, go upgrades k8s.io/client-go to v8.0.0+incompatible. But version v8.0.0+incompatible is actually older than v0.23.6.
exclude k8s.io/client-go v8.0.0+incompatible
added to have both github.com/influxdata/telegraf v1.16.3 and k8s.io/client-go v0.23.6.
I took this solution from prometheus https://github.com/prometheus/prometheus/blob/main/go.mod#L102-L103.
Not sure if we need to exclude other pre-go-mod kubernetes tags here. I decided to go with as small diff as possible in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think that's reasonable 👍
What this PR does / why we need it:
This PR bumps versions of k8s.io packages. This upgrade is needed to solve dependency issues when importing loki in other repositories where version of k8s.io is already upgraded.
For example, when I try to use loki in https://github.com/open-telemetry/opentelemetry-collector-contrib I face dependencies inconsistencies in modules which uses newer version of k8s.io packages:
These packages: k8s.io/api/auditregistration/v1alpha1, k8s.io/api/batch/v2alpha1, k8s.io/api/settings/v1alpha1 are available in k8s.io@v.0.17.5, somehow loki brings this old version of k8s.io package when it uses k8s.io/api@v0.22.7
Updating k8s.io packages to v0.23.6 solves this dependency issue
Special notes for your reviewer:
Checklist
CHANGELOG.md
.docs/sources/upgrading/_index.md