chore: bump Go to 1.26 and Kubernetes dependencies to 1.36#2646
chore: bump Go to 1.26 and Kubernetes dependencies to 1.36#2646rollandf wants to merge 1 commit into
Conversation
Greptile SummaryThis PR upgrades the project to Go 1.26 and Kubernetes 1.36 (
Confidence Score: 5/5This is a well-executed dependency upgrade; all API surface changes follow the new controller-runtime v0.24 contracts, scheme registration is complete and centralised, and the taint filter adapts the new three-argument signature with a deliberate choice that preserves pre-existing behaviour. Every changed code path was verified: the typed webhook validators correctly implement the admission.Validator[T] interface without any remaining runtime.Object casts; the five CRD types are all registered in the new central addKnownTypes(); klog and the enableComparisonOperators flag are wired up as intended; the sosreport script template-placeholder bug and missing execute bit are fixed; and Makefile tooling is self-consistent. No logic errors, missing registrations, or broken contracts were found. No files require special attention. The most behaviorally significant change is in pkg/nodeinfo/filter.go (taint toleration), which looks correct. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph old["Before (controller-runtime v0.22)"]
A1["ctrl.NewWebhookManagedBy(mgr)\n.For(&Type{}).WithValidator(v)"]
B1["webhook.CustomValidator\nValidateCreate(ctx, runtime.Object)\nValidateUpdate(ctx, old, new runtime.Object)\nValidateDelete(ctx, runtime.Object)"]
C1["Type-assert obj.(*ConcreteType)\nReturn error if fails"]
A1 --> B1 --> C1
end
subgraph new["After (controller-runtime v0.24)"]
A2["ctrl.NewWebhookManagedBy(mgr, &Type{})\n.WithValidator(v)"]
B2["admission.Validator[*ConcreteType]\nValidateCreate(ctx, *ConcreteType)\nValidateUpdate(ctx, old, new *ConcreteType)\nValidateDelete(ctx, *ConcreteType)"]
C2["No type assertion needed\nFramework injects typed object"]
A2 --> B2 --> C2
end
subgraph scheme["Scheme Registration"]
D1["Old: per-type init() in each _types.go\n -> SchemeBuilder.Register(&T{}, &TList{})"]
D2["New: central addKnownTypes()\n -> s.AddKnownTypes(GroupVersion, all 5 types)"]
D1 -.->|replaced by| D2
end
old -.->|migrated to| new
Reviews (2): Last reviewed commit: "chore: bump Go to 1.26 and Kubernetes de..." | Re-trigger Greptile |
Upgrade the project to Go 1.26 and Kubernetes 1.36 (k8s.io/* v0.36.1),
along with all tooling and API adaptations required by those bumps.
Go / module changes
- go.mod: set `go 1.26.0`; upgrade k8s.io/* from v0.34.8 → v0.36.1,
sigs.k8s.io/controller-runtime v0.22.5 → v0.24.1, and all transitive
dependencies (klog, kube-openapi, prometheus, grpc, kustomize, …)
Makefile tooling
- golangci-lint: v2.11.4 → v2.12.2 (first release that fully supports Go 1.26)
- Add GO_MOD_VERSION variable and pass GOTOOLCHAIN=go$(GO_MOD_VERSION) to
every go-install-tool invocation so tools are always built with the same
Go version declared in go.mod, preventing the "build version lower than
targeted version" error
- controller-gen: v0.19.0 → v0.21.0 (k8s v0.36 / Go 1.26 aligned release)
- setup-envtest: release-0.22 → release-0.24 (tracks controller-runtime v0.24)
- ENVTEST_K8S_VERSION: 1.28 → 1.36
API / webhook changes
- api/v1alpha1/groupversion_info.go: replace deprecated
sigs.k8s.io/controller-runtime/pkg/scheme.Builder with
k8s.io/apimachinery/pkg/runtime.NewSchemeBuilder; register all five CRD
types centrally via addKnownTypes() and metav1.AddToGroupVersion()
- api/v1alpha1/*_types.go: remove per-file init() SchemeBuilder.Register()
calls now that registration is centralised
- api/v1alpha1/validator/*_webhook.go: migrate from deprecated
webhook.CustomValidator (Validator[runtime.Object]) to the typed
admission.Validator[*ConcreteType] interface; update
NewWebhookManagedBy(mgr, &Type{}) call (object moved from .For() to the
constructor in controller-runtime v0.24); switch back to WithValidator()
now that validators are properly typed; drop runtime.Object type
assertions from each ValidateCreate/Update/Delete method
Bug fixes
- pkg/nodeinfo/filter.go: update ToleratesTaint() call to the new k8s 1.36
signature (logger klog.Logger, taint *Taint, enableComparisonOperators bool);
pass klog.Background() and true to preserve existing Lt/Gt operator behaviour
- scripts/sosreport/kubectl-netop_sosreport: fix two component entries whose
keys and label selectors were left as unresolved Go template placeholders
({{ }}) by generate-maps.sh; correct to
name=network-operator-sriov-device-plugin and app=rdma-shared-dp
- scripts/sosreport/kubectl-netop_sosreport: restore missing execute bit
Signed-off-by: Fred Rolland <frolland@nvidia.com>
Upgrade the project to Go 1.26 and Kubernetes 1.36 (k8s.io/* v0.36.1), along with all tooling and API adaptations required by those bumps.
Go / module changes
go 1.26.0; upgrade k8s.io/* from v0.34.8 → v0.36.1, sigs.k8s.io/controller-runtime v0.22.5 → v0.24.1, and all transitive dependencies (klog, kube-openapi, prometheus, grpc, kustomize, …)Makefile tooling
API / webhook changes
Bug fixes