Skip to content

DNM : Upgrade k8s libraries to v0.36.0 and Go 1.26#1823

Open
sameerforge wants to merge 1 commit intocarvel-dev:developfrom
sameerforge:dep/kapp-ctrl-v0.36-bump
Open

DNM : Upgrade k8s libraries to v0.36.0 and Go 1.26#1823
sameerforge wants to merge 1 commit intocarvel-dev:developfrom
sameerforge:dep/kapp-ctrl-v0.36-bump

Conversation

@sameerforge
Copy link
Copy Markdown
Contributor

@sameerforge sameerforge commented May 8, 2026

Description
This PR aligns kapp-controller with the latest upstream Kubernetes v0.36.0 library stack and migrates the project to the Go 1.26 runtime.

Changes & Technical Impacts
Runtime Requirement: Upstream k8s.io libraries now strictly require Go 1.26.

API Server Lifecycle: The k8s.io/apiserver framework has removed legacy StopCh signals in PostStartHookContext. The initialization logic in pkg/apiserver requires a refactor to a Context-based lifecycle.

Controller-Runtime Interfaces: The upgrade to v0.23.3 introduces signature changes in TypedEventHandler and ResourceEventHandlerRegistration (specifically the new HasSyncedChecker method), affecting reconciler stability.

Dependency Alignment: Includes updates for kube-aggregator, controller-tools, and code-generator to maintain ecosystem synchronization.

❌ Current Build Failures
The following errors were captured after the dependency bump, highlighting the specific areas requiring refactoring:

Click to expand build_errors.log
# sigs.k8s.io/controller-runtime/pkg/cache
vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go:363:9: cannot use handles (variable of struct type handlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: handlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSyncedChecker)
vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go:380:9: cannot use handles (variable of struct type handlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: handlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSyncedChecker)
vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go:397:9: cannot use handles (variable of struct type handlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: handlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSyncedChecker)
vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go:402:17: impossible type assertion: h.(handlerRegistration)
	handlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSyncedChecker)
# carvel.dev/kapp-controller/pkg/reconciler
pkg/reconciler/configmap_handler.go:25:14: not enough type arguments for type TypedEventHandler: have 1, want 2
pkg/reconciler/configmap_handler.go:25:54: cannot use &ConfigMapHandler{} (value of type *ConfigMapHandler) as handler.TypedEventHandler[*"k8s.io/api/core/v1".ConfigMap] value in variable declaration
pkg/reconciler/secret_handler.go:25:14: not enough type arguments for type TypedEventHandler: have 1, want 2
pkg/reconciler/secret_handler.go:25:51: cannot use &SecretHandler{} (value of type *SecretHandler) as handler.TypedEventHandler[*"k8s.io/api/core/v1".Secret] value in variable declaration
# carvel.dev/kapp-controller/pkg/apiserver
pkg/apiserver/apiserver.go:140:47: hookContext.StopCh undefined (type server.PostStartHookContext has no field or method StopCh)

Analysis of Failures:

Cache Layer: The mismatch in ResourceEventHandlerRegistration shows that controller-runtime and client-go versions in this stack have incompatible internal interfaces.

Reconcilers: The TypedEventHandler errors confirm that our reconciler signatures need to be updated to support new generic arguments.

API Server: The StopCh error is the most critical, indicating that the apiserver library has removed the legacy channel-based shutdown in favor of context.Context.

Signed-off-by: Sameer <sameer.khan@broadcom.com>
@carvel-bot carvel-bot added this to Carvel May 8, 2026
@sameerforge sameerforge changed the title Upgrade k8s libraries to v0.36.0 and Go 1.26 DNM : Upgrade k8s libraries to v0.36.0 and Go 1.26 May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants