[v0.14] Add k8s.io staging replace directives#4900
Merged
Conversation
k8s.io/kubernetes publishes its go.mod without the local replace directives that map its staging repos (k8s.io/api, k8s.io/client-go, etc.) to the monorepo. The published require entries list those modules at v0.0.0, which does not exist on the module proxy. Renovate runs go get -d -t ./... before go mod tidy; that step fetches the k8s.io/kubernetes go.mod transitively and fails when it cannot resolve k8s.io/api@v0.0.0. Adding replace directives here routes every k8s.io staging module to its real published version (v0.34.5), matching the pattern used in rancher/rancher.
thardeck
added a commit
that referenced
this pull request
Mar 27, 2026
* Revert "Add k8s.io staging replace directives (#4900)" This reverts commit 8e37870. * Remove k8s.io/kubernetes, use client-go scheme k8s.io/kubernetes publishes its go.mod without replace directives for its staging repos, listing them at v0.0.0. This causes Renovate's pre-tidy go get step to fail. Instead of adding staging replace directives as a workaround, remove the direct k8s.io/kubernetes dependency. Switch scheme.go to use k8s.io/client-go/kubernetes/scheme, which is the canonical source for versioned Kubernetes API types and avoids the transitive import of the monorepo. Also drop the now-unnecessary indirect deps k8s.io/component-helpers and k8s.io/controller-manager.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
k8s.io/kubernetes publishes its go.mod without the local replace directives that map its staging repos (k8s.io/api, k8s.io/client-go, etc.) to the monorepo. The published require entries list those modules at v0.0.0, which does not exist on the module proxy.
Renovate runs go get -d -t ./... before go mod tidy; that step fetches the k8s.io/kubernetes go.mod transitively and fails when it cannot resolve k8s.io/api@v0.0.0.
Adding replace directives here routes every k8s.io staging module to its real published version (v0.34.5), matching the pattern used in rancher/rancher.
Should fix broken Renovate Kubernetes bumps like: #4876