Skip to content

fix(k8s): remove obsolete cloud-node-lifecycle controller flag - #4289

Open
ZainnQureshii wants to merge 1 commit into
loft-sh:mainfrom
ZainnQureshii:fix/k8s-137-cloud-node-lifecycle
Open

ZainnQureshii wants to merge 1 commit into
loft-sh:mainfrom
ZainnQureshii:fix/k8s-137-cloud-node-lifecycle

Conversation

@ZainnQureshii

@ZainnQureshii ZainnQureshii commented Nov 23, 2026 •

Copy link
Copy Markdown

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-lifecycle to kube-controller-manager (pkg/k8s/k8s.go:187 and pkg/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 enters CrashLoopBackOff as reported in #4286. Kubernetes controller validation

Remove -cloud-node-lifecycle from 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 through controlPlane.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:23 and pkg/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-lifecycle controller argument.

What else do we need to know?

A local Go source probe parsed the three default --controllers literals 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 that MergeArgs produces one --controllers argument 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/command
  • go vet ./pkg/k8s
  • golangci-lint run --timeout 15m --config .golangci-fork.yml -- ./pkg/k8s
  • golangci-lint fmt --diff pkg/k8s/k8s.go

Prepared 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

none

🤖 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-lifecycle from the default kube-controller-manager --controllers lists when virtual scheduler is on and in the standard (non–private-nodes) path in pkg/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 / extraArgs can still override the list.

Reviewed by Cursor Bugbot for commit bda2b7c. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k8s distro CrashLoops on Kubernetes 1.37: controller-manager still passed -cloud-node-lifecycle (removed in 1.37)

1 participant