Skip to content

Bump k8s.io/* deps to v0.36.x and controller-runtime to v0.24.1 - #330

Merged
afritzler merged 6 commits into
ironcore-dev:mainfrom
ricogu:chore-upgrade-client-go-v0.36.1
Jun 11, 2026
Merged

Bump k8s.io/* deps to v0.36.x and controller-runtime to v0.24.1#330
afritzler merged 6 commits into
ironcore-dev:mainfrom
ricogu:chore-upgrade-client-go-v0.36.1

Conversation

@ricogu

@ricogu ricogu commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps the Kubernetes client libraries and controller-runtime to their latest releases, aligning the operator with the Kubernetes 1.36 ecosystem.

Changes Made

Dependency Before After
k8s.io/api v0.35.0 v0.36.1
k8s.io/apimachinery v0.35.0 v0.36.1
k8s.io/client-go v0.35.0 v0.36.1
sigs.k8s.io/controller-runtime v0.23.3 v0.24.1
k8s.io/apiextensions-apiserver (indirect) v0.35.0 v0.36.0
k8s.io/apiserver (indirect) v0.35.0 v0.36.0
k8s.io/component-base (indirect) v0.35.0 v0.36.0
go directive 1.25.6 1.26.0

Note: client-go module versions (v0.x) mirror Kubernetes releases (1.x), so v0.36 = Kubernetes 1.36.

Notable Feature: ClientsAllowCARotation (Beta in Kubernetes 1.36)

client-go v0.36 includes the ClientsAllowCARotation feature gate, introduced as a Beta feature (enabled by default) in Kubernetes 1.36 via kubernetes/kubernetes#132922, which fixes kubernetes/kubernetes#119483.

From the official release note:

k8s.io/client-go/transport now automatically reloads certificate authority roots from disk when they are supplied via a file path. This functionality is enabled by default and can be disabled via the ClientsAllowCARotation feature gate.

This is relevant for long-running operators like boot-operator: CA rotations are handled transparently without dropping connections or requiring a restart.

Type of Change

  • Dependency update (non-breaking change)

Testing

  • All unit tests pass (make test)
  • Build verified (go build ./...)
  • No code changes required — the API surface used by this operator is unchanged between v0.35 and v0.36

Summary by CodeRabbit

  • Chores

    • Updated Go toolchain from 1.25.6 to 1.26.0.
    • Upgraded Kubernetes API and client dependencies to newer versions.
    • Updated linting tools (v2.6 to v2.12) and added test file linter exclusions.
  • Refactor

    • Internal code structure improvements for better maintainability.

- k8s.io/api, k8s.io/apimachinery, k8s.io/client-go: v0.35.0 -> v0.36.1
- sigs.k8s.io/controller-runtime: v0.23.3 -> v0.24.1
- Indirect: k8s.io/apiextensions-apiserver, k8s.io/apiserver,
  k8s.io/component-base: v0.35.0 -> v0.36.0
- go directive bumped to 1.26.0 (required by k8s.io/api v0.36.1)

Signed-off-by: Rico Gu <yuanxun.gu@sap.com>
@ricogu
ricogu force-pushed the chore-upgrade-client-go-v0.36.1 branch from 7ba3e88 to 6e64fc0 Compare June 11, 2026 09:50
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 232174a0-51f0-4d34-b308-c106e3bfa1a9

📥 Commits

Reviewing files that changed from the base of the PR and between c9ed570 and 3462950.

📒 Files selected for processing (7)
  • .github/workflows/lint.yml
  • .golangci.yml
  • api/v1alpha1/groupversion_info.go
  • api/v1alpha1/httpbootconfig_types.go
  • api/v1alpha1/ipxebootconfig_types.go
  • api/v1alpha1/zz_generated.deepcopy.go
  • server/helper.go
✅ Files skipped from review due to trivial changes (3)
  • .golangci.yml
  • server/helper.go
  • api/v1alpha1/zz_generated.deepcopy.go

📝 Walkthrough

Walkthrough

Go toolchain upgraded to 1.26.0 with Kubernetes dependencies refreshed to v0.36.x/v0.24.x versions. API scheme registration refactored from controller-runtime scheme.Builder to runtime.NewSchemeBuilder with callbacks. Configuration files and linting updated; helper code simplified with constant extraction.

Changes

Go & Kubernetes upgrade with API scheme wiring refactoring

Layer / File(s) Summary
Go toolchain and direct Kubernetes dependencies
go.mod
Go directive bumped from 1.25.6 to 1.26.0; direct k8s.io/api, k8s.io/apimachinery, k8s.io/client-go, k8s.io/utils, and sigs.k8s.io/controller-runtime dependencies advanced to v0.36.x/v0.24.x versions.
Indirect dependency updates
go.mod
Indirect modules refreshed: grpc-gateway/v2 to v2.27.7, Prometheus packages (prometheus/common, prometheus/procfs), OpenTelemetry modules (otelhttp, otlptrace, otlptracegrpc), generated/proto packages (google.golang.org/genproto, google.golang.org/protobuf), Kubernetes-adjacent packages (klog, kube-openapi, streaming), and sigs.k8s.io/structured-merge-diff/v6 updated; google/btree removed.
Autogenerated deepcopy and new imports
api/v1alpha1/zz_generated.deepcopy.go, api/v1alpha1/httpbootconfig_types.go, api/v1alpha1/ipxebootconfig_types.go
Runtime import adjusted in generated deepcopy file; k8s.io/apimachinery/pkg/runtime imports added to type files to support callback-based scheme registration.
API scheme registration refactoring
api/v1alpha1/groupversion_info.go, api/v1alpha1/httpbootconfig_types.go, api/v1alpha1/ipxebootconfig_types.go
SchemeBuilder replaced with runtime.NewSchemeBuilder using metav1.AddToGroupVersion for group/version registration; HTTPBootConfig and IPXEBootConfig now register types via s.AddKnownTypes() callbacks in init() instead of direct type registration.
Linting configuration updates
.github/workflows/lint.yml, .golangci.yml
golangci-lint-action version bumped from v2.6 to v2.12; new linter exclusion rule added to suppress goconst and lll checkers for test files matching .*_test.go.
Helper code constant extraction
server/helper.go
Unexported constant serverBootConfigurationKind introduced for ServerBootConfiguration kind string; ownerSBCName refactored to use constant instead of hardcoded literal.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

api-change

Suggested reviewers

  • hardikdr
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive Issue #119483 required setting reloadTLSFiles when CAFile is set and adding tests. This PR is a dependency upgrade to client-go v0.36 which includes the ClientsAllowCARotation feature that fixes the issue, but the PR itself contains no code implementing the fix. Clarify whether this PR depends on the upstream Kubernetes/client-go fix being already included in v0.36.1, or if additional code changes are needed to enable the feature in this operator.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: bumping k8s.io/* dependencies to v0.36.x and controller-runtime to v0.24.1.
Description check ✅ Passed The PR description provides a comprehensive summary with changes table, relevant feature notes, testing confirmation, and type of change. It exceeds the basic template requirements.
Out of Scope Changes check ✅ Passed All changes are in-scope: dependency updates to go.mod, related toolchain upgrade (go 1.26.0), lint configuration updates, code generation updates, and a minor refactoring (serverBootConfigurationKind constant). No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ricogu added 4 commits June 11, 2026 14:50
- Replace sigs.k8s.io/controller-runtime/pkg/scheme.Builder (deprecated
  in controller-runtime v0.24) with runtime.NewSchemeBuilder from
  k8s.io/apimachinery; register all types centrally in addKnownTypes()
- Remove now-redundant SchemeBuilder.Register init() calls from type files
- Regenerate zz_generated.deepcopy.go to match updated controller-gen output
- Add missing SPDX header to internal/uki/oci_test.go

Signed-off-by: Rico Gu <yuanxun.gu@sap.com>
golangci-lint v2.6 is built with Go 1.25 and refuses to run against a
module declaring go 1.26.0 (required by k8s.io/* v0.36). Bump to v2.12
which supports Go 1.26.

Also regenerate zz_generated.deepcopy.go without running make fmt
afterwards; goimports was adding an explicit 'v1' alias to the
k8s.io/api/core/v1 import that controller-gen does not emit, causing
the check-codegen CI diff check to fail.

Signed-off-by: Rico Gu <yuanxun.gu@sap.com>
internal/** is already covered by REUSE.toml; inline header not needed.

Signed-off-by: Rico Gu <yuanxun.gu@sap.com>
golangci-lint v2.12 enforces goconst more strictly than v2.6:
- Exclude goconst from test files (repeated string literals in test
  fixtures are intentional, not duplication problems)
- Extract "ServerBootConfiguration" kind string to a named constant
  in server/helper.go

Signed-off-by: Rico Gu <yuanxun.gu@sap.com>
defo89
defo89 previously approved these changes Jun 11, 2026

@afritzler afritzler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small nit: I would follow the latest kubebuilder style schema and type registration. That way we stay consistent with the community style api setup.

Comment thread api/v1alpha1/groupversion_info.go Outdated
Comment thread api/v1alpha1/groupversion_info.go Outdated
Comment thread api/v1alpha1/httpbootconfig_types.go
Comment thread api/v1alpha1/ipxebootconfig_types.go
@afritzler afritzler changed the title chore: upgrade client-go to v0.36.1 and controller-runtime to v0.24.1 Bump k8s.io/* deps to v0.36.x and controller-runtime to v0.24.1 Jun 11, 2026
@afritzler afritzler added the enhancement New feature or request label Jun 11, 2026
Per review feedback, align with the kubebuilder v4 scaffold pattern:
- groupversion_info.go: NewSchemeBuilder with metav1.AddToGroupVersion only
- httpbootconfig_types.go: init() registers types via s.AddKnownTypes
- ipxebootconfig_types.go: same

This keeps type registration local to each type file as intended by
the kubebuilder design, rather than centralised in groupversion_info.go.

Signed-off-by: Rico Gu <yuanxun.gu@sap.com>
@ricogu

ricogu commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@afritzler , all comments addressed, please have a look, thanks!

@ricogu
ricogu requested review from afritzler and defo89 June 11, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

client-go doesn't properly handle reloading trust anchors during cluster CA rotation

4 participants