Repository navigation
fix(k8s): remove obsolete cloud-node-lifecycle controller flag - #4289
Open
ZainnQureshii wants to merge 1 commit into
Open
ZainnQureshii wants to merge 1 commit into
ZainnQureshii wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What issue type does this pull request address?
/kind bugfix
What does this pull request do? Which issues does it resolve?
resolves #4286
When the k8s distro is configured with Kubernetes
v1.37.2, the chart selects that image tag (chart/templates/_init-containers.tpl:3). The standard and virtual-scheduler defaults passed-cloud-node-lifecycletokube-controller-manager(pkg/k8s/k8s.go:187andpkg/k8s/k8s.go:198). Kubernetes 1.37 rejects the removed controller name even with a minus prefix. vCluster exits when the controller manager returns an error (pkg/k8s/k8s.go:216), and the syncer entersCrashLoopBackOffas reported in #4286. Kubernetes controller validationRemove
-cloud-node-lifecyclefrom both defaults. Private nodes use a separate list (pkg/k8s/k8s.go:175). A custom controller-manager command bypasses the generated flags (pkg/k8s/k8s.go:144), and disabling the controller manager skips its launch (pkg/k8s/k8s.go:140).Kubernetes v1.34.0, v1.35.10, and v1.36.6 already skip cloud-provider controllers during startup. v1.34.0, v1.35.10, v1.36.6
On affected releases, users can supply a replacement
--controllers=<list>argument without the obsolete entry throughcontrolPlane.distro.k8s.controllerManager.extraArgs. vCluster merges the extra arguments before launch (pkg/k8s/k8s.go:212), and the merge replaces the existing flag by name (pkg/util/command/command.go:23andpkg/util/command/command.go:42).Please provide a short message that should be published in the vcluster release notes
Fixed a k8s distro startup failure on Kubernetes 1.37 caused by the obsolete
-cloud-node-lifecyclecontroller argument.What else do we need to know?
A local Go source probe parsed the three default
--controllersliterals and checked their names against the Kubernetes v1.37.2 controller registry and aliases. The standard and virtual-scheduler lists failed before the fix and passed afterward. The private-node list passed in both runs. A separate probe confirmed thatMergeArgsproduces one--controllersargument when an override is supplied.Checks passed with Go 1.26.10, vendored dependencies, and golangci-lint 2.7.0. The lint command used the fork configuration from the lint workflow.
go test -race -covermode=atomic -count=1 ./pkg/k8s ./pkg/util/commandgo vet ./pkg/k8sgolangci-lint run --timeout 15m --config .golangci-fork.yml -- ./pkg/k8sgolangci-lint fmt --diff pkg/k8s/k8s.goPrepared with AI assistance (Codex and Claude Code) and reviewed with GitHub Copilot.
E2E Tests
Default Test Execution
Use the mandatory PR suite.
Adding New Test Suites
N/A.
Additional test suites
🤖 Generated with Claude Code
Note
Low Risk
Narrow flag tweak for an removed upstream controller; no auth or data-path changes.
Overview
Fixes vCluster k8s distro startup on Kubernetes 1.37 by dropping
-cloud-node-lifecyclefrom the defaultkube-controller-manager--controllerslists when virtual scheduler is on and in the standard (non–private-nodes) path inpkg/k8s/k8s.go.1.37 treats that controller name as invalid, so the manager exits and the syncer can CrashLoopBackOff (#4286). Private-nodes defaults were already unchanged; custom
controllerManager.command/extraArgscan still override the list.Reviewed by Cursor Bugbot for commit bda2b7c. Bugbot is set up for automated code reviews on this repo. Configure here.