chore: update all dependencies to latest versions - #997
Merged
k8s-ci-robot merged 5 commits intoMar 16, 2026
Merged
Conversation
- Go 1.25.7 β 1.26.1 (.go-version, all go.mod files) - go get -u all direct/indirect Go module dependencies - k8s.io/* v0.35.0 β v0.35.2 across all modules - actions/checkout v5 β v6 - goreleaser/goreleaser-action v6 β v7 - golangci/golangci-lint-action v9.0.0 β v9.2.0 - golangci-lint tool v2.4.0 β v2.11.3 - Dockerfile: golang image 1.25.7 β 1.26.1 - Dockerfile: go-runner eks-1-34 β eks-1-35 - Dockerfile: eks-distro-minimal-base-nonroot updated to 2026-03-10 tag
Replace the k8s.io/kubernetes monorepo dependency in both test modules with lighter, purpose-built alternatives: e2e module: - Drop k8s.io/kubernetes/test/e2e/framework scaffolding - Replace with direct ginkgo v2 + client-go calls - Remove all 29 replace directives (framework was sole driver) - go.mod: 114 β 65 lines integration module: - Drop k8s.io/kubernetes in-process server + go:linkname hack - Replace framework.StartTestServer with envtest.Environment - Write admin kubeconfig via clientcmd using client cert auth - Simplify TestMain (etcd lifecycle now managed by envtest) - Remove all 32 replace directives, keep only local module replace - go.mod: 201 β 95 lines
Integration tests (testutils/testserver.go): - Fix exec client silently bypassing IAM auth: nil out cert fields before setting ExecProvider so the webhook is actually exercised - Replace hardcoded 1.29.5 envtest binary path with envtestBinaryPath() helper that checks KUBEBUILDER_ASSETS, falls back to setup-envtest use 1.35, and skips with instructions if neither is available - Replace deprecated wait.PollImmediate with PollUntilContextTimeout E2e tests (suite_test.go): - Move flag.Parse() from init() into a new TestMain; remove testing.Init() - Remove deprecated rand.Seed (Go 1.20+ auto-seeds global rand) - Replace deprecated RunSpecsWithDefaultAndCustomReporters with RunSpecs and a ReportAfterSuite hook using reporters.GenerateJUnitReport Go workspace: - Add go.work covering root, tests/e2e, tests/integration - Remove go.work* from .gitignore (go.work must be committed since tests/integration relies on it to resolve the local root module) - Remove now-redundant replace directive from tests/integration/go.mod - go work sync pulled ginkgo/gomega into root go.mod as indirect deps .gitignore: add integration test server runtime artifacts
- Add HealthPort to config.Config; server.Run uses it (defaults to 21363) - Allocate authenticator server and healthz ports dynamically via freePort() to avoid conflicts when multiple test processes run in parallel - Fix MkdirTemp error being silently ignored in testConfig - Replace context.TODO() with context.Background() in server.New call - Replace //nolint:errcheck on testEnv.Stop() with t.Logf for observability - Pin setup-envtest version to 1.35.0 for reproducible binary downloads
bryantbiggs
force-pushed
the
deps/update-all-modules-2026-03-16
branch
from
March 16, 2026 15:50
0f9edd9 to
9f0a519
Compare
β¦ld selector Also fix govulncheck-action for fork PRs by setting repo-checkout: false; the action's internal checkout conflicts with the explicit checkout step when the PR originates from a fork, causing a duplicate Authorization header. Also fix e2e run script: remove -gce-zone flag (was registered by the old k8s.io/kubernetes framework, which is no longer a dependency) and update ginkgo install to v2 to match the test suite.
bryantbiggs
force-pushed
the
deps/update-all-modules-2026-03-16
branch
from
March 16, 2026 17:06
9f0a519 to
1d65eba
Compare
Member
Author
|
cc @kmala - I know its a big PR ( apologies) but it cleans up a number of outdated modules and practices which should resolve most open PRs and make maintenance easier going forward |
Contributor
|
Thanks a lot for this @bryantbiggs |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryantbiggs, kmala 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 |
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.
This PR brings the entire repository up to date β Go toolchain, all module dependencies, Docker base images, and GitHub Actions β and takes the opportunity to resolve several long-standing structural problems in the test infrastructure that have made the project harder to maintain and contributed to the dependency debt in the first place.
Why this matters
The
k8s.io/kubernetesmonorepo problem (and why it kept coming back)The root cause of the stale dependency situation was a structural one: both test modules depended on
k8s.io/kubernetes, the full Kubernetes monorepo. That single dependency dragged in 29β32replacedirectives per module, all of which had to be kept manually in sync with each other and with the monorepo version. Every time any of those packages released a new version, the replace directives would fall out of sync andgo mod tidywould either fail or produce an inconsistent module graph. This is why Dependabot PRs in this repo tend to stack up β updating one group of deps often conflicts with the replace directive web.This PR removes
k8s.io/kubernetesfrom both test modules entirely. The e2e module goes from 114 lines and 29 replace directives to 65 lines and zero. The integration module goes from 201 lines and 32 replace directives to 95 lines and zero. Future dependency updates β whether manual or via Dependabot β will be straightforward.The integration tests weren't actually testing the auth webhook
The integration tests existed to verify that the IAM authentication webhook works end-to-end: a client presents a token, the kube-apiserver calls the webhook, the webhook calls STS, and access is granted or denied based on the IAM role mapping. That flow was silently broken.
The root cause:
execRestCfg(the client config used to test IAM-authenticated access) had bothTLSClientConfig.CertDataandExecProviderset simultaneously. When both are present,client-gouses mTLS β the client certificate satisfies authentication before the webhook is ever called. TheExecProvider(which invokesaws-iam-authenticator token) was ignored entirely. The tests were passing because the client cert auth succeeded, not because the IAM webhook worked.This PR fixes that by clearing the cert fields from
execRestCfgbefore attaching theExecProvider. The webhook is now actually exercised on every test run β STS calls are visible in the test output, and the test correctly fails with"identity is not mapped"when a valid AWS role is not configured, as expected.The
go:linknamehack is goneThe old integration test framework used
//go:linkname startEtcd k8s.io/kubernetes/test/integration/framework.startEtcdto call an unexported function in the monorepo. This was fragile (any internal refactor of the monorepo would silently break it), relied onunsafe, and was the primary reasonk8s.io/kubernetescouldn't be removed. The migration tosigs.k8s.io/controller-runtime/pkg/envtesteliminates this entirely β envtest is the standard, supported way to run integration tests against a real kube-apiserver in the Kubernetes ecosystem.go.workfor clean multi-module managementThe three Go modules in this repo (root,
tests/e2e,tests/integration) previously relied on replace directives to reference each other locally.go.workis the idiomatic solution for this since Go 1.18 β it handles cross-module references at the workspace level without polluting individualgo.modfiles.go.work.sumis committed so the workspace is immediately usable aftergit clonewith no extra setup.What changed
Dependencies
1.25.7β1.26.1k8s.io/*: βv0.35.2across all moduleseks-1-34βeks-1-35, minimal-base-nonroot β2026-03-10checkoutv5βv6,golangci-lint-actionv9.0βv9.2 (linter v2.4βv2.11),goreleaser-actionv6βv7Test infrastructure
k8s.io/kubernetesremoved fromtests/e2e/go.modandtests/integration/go.modgo.workadded at repo root;go.work*removed from.gitignorecontroller-runtime/pkg/envtestconfig.Config.HealthPortfield added;server.Runuses it with a default of 21363 (fully backward compatible)os.MkdirTemperror handling fixedcontext.TODO()βcontext.Background()in server initializationtestEnv.Stop()errors logged rather than suppressedsetup-envtestpinned to1.35.0for reproducible binary downloadsRunning the integration tests locally
Resolves
Resolves #996
Resolves #993
Resolves #992
Resolves #991
Resolves #989
Resolves #987
Resolves #984
Test plan
go test ./pkg/...β 157 tests, 33 packages, all passinggo build ./...clean across all three modulesgo vet ./...cleangolangci-lint runclean