Skip to content

[v0.14] Add k8s.io staging replace directives#4900

Merged
thardeck merged 1 commit into
release/v0.14from
add_k8s_replace_v0.14
Mar 27, 2026
Merged

[v0.14] Add k8s.io staging replace directives#4900
thardeck merged 1 commit into
release/v0.14from
add_k8s_replace_v0.14

Conversation

@thardeck
Copy link
Copy Markdown
Collaborator

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

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 thardeck self-assigned this Mar 27, 2026
@thardeck thardeck added this to Fleet Mar 27, 2026
@thardeck thardeck requested a review from a team as a code owner March 27, 2026 08:51
@thardeck thardeck moved this to 👀 In review in Fleet Mar 27, 2026
@thardeck thardeck enabled auto-merge (squash) March 27, 2026 09:10
@thardeck thardeck changed the title Add k8s.io staging replace directives [v0.14] Add k8s.io staging replace directives Mar 27, 2026
Copy link
Copy Markdown
Collaborator

@mmartin24 mmartin24 left a comment

Choose a reason for hiding this comment

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

LGTM

@thardeck thardeck merged commit 8e37870 into release/v0.14 Mar 27, 2026
22 of 23 checks passed
@thardeck thardeck deleted the add_k8s_replace_v0.14 branch March 27, 2026 09:12
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Fleet Mar 27, 2026
@kkaempf kkaempf added this to the v2.13.5 milestone Mar 27, 2026
thardeck added a commit that referenced this pull request Mar 27, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants