Skip to content

Upgrade k8s.io/* deps to v0.36.x#1504

Open
afritzler wants to merge 2 commits into
mainfrom
enh/k8s-1.36
Open

Upgrade k8s.io/* deps to v0.36.x#1504
afritzler wants to merge 2 commits into
mainfrom
enh/k8s-1.36

Conversation

@afritzler

@afritzler afritzler commented Jul 6, 2026

Copy link
Copy Markdown
Member

Proposed Changes

Upgrade k8s.io/* Dependencies to v0.36.x.

Fixes #1503

Summary by CodeRabbit

  • New Features
    • Enhanced shared informer factory with context-based startup and improved cache sync reporting.
    • Improved informer behavior consistency across resources through a shared “with options” construction approach.
  • Bug Fixes
    • Updated envtest/Kubernetes binary asset versions to 1.36.
    • Improved streaming execution handling for machine command operations.
    • Made VolumeClass creation checks more resilient in tests.
  • Documentation
    • Regenerated API reference links for Kubernetes v1.36 and added documentation for Machine guestConfig.

Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
@afritzler afritzler requested a review from a team July 6, 2026 07:46
@afritzler afritzler changed the title Upgrade k8s.io/* Dependencies to v0.36.x Upgrade k8s.io/* deps to v0.36.x Jul 6, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR upgrades Go and Kubernetes-related dependencies, regenerates informer and OpenAPI code for v1.36, updates API reference links and envtest binary versions to 1.36.0, adjusts one SPDY transport call site, and changes one admission test to wait for eventual resource creation.

Changes

Kubernetes v0.36.x Dependency Upgrade

Layer / File(s) Summary
Go module and build tool versions
go.mod, Makefile
Go is bumped to 1.26.0; Kubernetes and related dependencies are upgraded; Makefile computes envtest versions dynamically and updates controller-tools.
Shared informer factory context support
client-go/informers/externalversions/factory.go, client-go/informers/externalversions/internalinterfaces/factory_interfaces.go
Adds InformerOptions, InformerName(), WithInformerName, and context-based factory start/sync methods.
Compute/core informer refactor
client-go/informers/externalversions/compute/v1alpha1/*.go, client-go/informers/externalversions/core/v1alpha1/resourcequota.go
Machine, MachineClass, MachinePool, and ResourceQuota informers now use WithOptions constructors with GroupVersionResource identifiers.
IPAM informer refactor
client-go/informers/externalversions/ipam/v1alpha1/*.go
Prefix and PrefixAllocation informers are routed through new options-based constructors.
Networking informer refactor
client-go/informers/externalversions/networking/v1alpha1/*.go
LoadBalancer, LoadBalancerRouting, NATGateway, Network, NetworkInterface, NetworkPolicy, and VirtualIP informers are refactored to options-based constructors.
Storage informer refactor
client-go/informers/externalversions/storage/v1alpha1/*.go
Bucket, BucketClass, BucketPool, Volume, VolumeClass, VolumePool, and VolumeSnapshot informers are refactored to options-based constructors.
Fake clientset and OpenAPI schema regeneration
client-go/ironcore/versioned/fake/clientset_generated.go, client-go/openapi/zz_generated.openapi.go
The fake clientset comment changes, and OpenAPI regeneration adds new schema types and field definitions while updating descriptions.
API reference docs and config
docs/api-reference/*.md, hack/api-reference/config.json
Docs links are updated from v1.35 to v1.36, and Machine guestConfig/MachineGuestConfig is documented.
Envtest binary version bumps
broker/*/server/server_suite_test.go, internal/controllers/*/suite_test.go, poollet/*/controllers/controllers_suite_test.go
Envtest binary asset paths move from Kubernetes 1.35.0 to 1.36.0.
SPDY transport update
irictl-machine/cmd/irictl-machine/irictlmachine/exec/exec.go
The exec command now uses client-go/transport/spdy for the streaming upgrader.
Admission test wait logic
internal/admission/plugin/volumeresizepolicy/admission_test.go
VolumeClass creation assertions switch from immediate success checks to Eventually-based waits.

Estimated code review effort: 3 (Moderate) | ~30 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the main change: upgrading k8s.io dependencies to v0.36.x.
Description check ✅ Passed It includes Proposed Changes and Fixes #1503, though it doesn't fully follow the bullet-list template.
Linked Issues check ✅ Passed The changes align with #1503 by upgrading k8s.io modules to v0.36.x, controller-runtime to v0.24.x, and Go to 1.26.
Out of Scope Changes check ✅ Passed The extra Makefile, docs, test, and generated-code updates are consistent with the dependency upgrade and compatibility work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enh/k8s-1.36

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@client-go/informers/externalversions/factory.go`:
- Around line 163-164: The generated informer setup assumes InformerName is
always present, but the factory treats it as optional, so creation can panic
when WithInformerName is not used. Update the informer initialization path in
the factory and generated informer constructors to guard options.InformerName
before calling WithResource, either by setting a safe default InformerName
earlier in the factory setup or by skipping the metrics wiring when it is nil.
Use the existing Factory and InformerName usage sites to keep the fix consistent
across all generated informers.

In `@client-go/informers/externalversions/ipam/v1alpha1/prefix.go`:
- Around line 53-55: The informer identity in NewPrefixInformerWithOptions is
built from a गलत GVR resource name, so update the GroupVersionResource used for
the Prefix informer from the current singular-plural typo to the correct API
plural. Make sure the gvr value in NewPrefixInformerWithOptions matches the
typed client and generic informer resource name, and keep the rest of the
informer setup unchanged.

In `@client-go/informers/externalversions/storage/v1alpha1/volumeclass.go`:
- Around line 52-54: The VolumeClass informer is using the wrong
GroupVersionResource resource name, which breaks the informer Identifier lookup.
Update NewVolumeClassInformerWithOptions so the schema.GroupVersionResource for
the VolumeClass resource uses the correct plural name, and keep the identifier
generation via options.InformerName.WithResource(gvr) aligned with the typed
client and generic informer map.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f1771e6-37e2-4d23-908b-dfe29d20b139

📥 Commits

Reviewing files that changed from the base of the PR and between 8be9150 and 401752c.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (44)
  • Makefile
  • broker/bucketbroker/server/server_suite_test.go
  • broker/machinebroker/server/server_suite_test.go
  • broker/volumebroker/server/server_suite_test.go
  • client-go/informers/externalversions/compute/v1alpha1/machine.go
  • client-go/informers/externalversions/compute/v1alpha1/machineclass.go
  • client-go/informers/externalversions/compute/v1alpha1/machinepool.go
  • client-go/informers/externalversions/core/v1alpha1/resourcequota.go
  • client-go/informers/externalversions/factory.go
  • client-go/informers/externalversions/internalinterfaces/factory_interfaces.go
  • client-go/informers/externalversions/ipam/v1alpha1/prefix.go
  • client-go/informers/externalversions/ipam/v1alpha1/prefixallocation.go
  • client-go/informers/externalversions/networking/v1alpha1/loadbalancer.go
  • client-go/informers/externalversions/networking/v1alpha1/loadbalancerrouting.go
  • client-go/informers/externalversions/networking/v1alpha1/natgateway.go
  • client-go/informers/externalversions/networking/v1alpha1/network.go
  • client-go/informers/externalversions/networking/v1alpha1/networkinterface.go
  • client-go/informers/externalversions/networking/v1alpha1/networkpolicy.go
  • client-go/informers/externalversions/networking/v1alpha1/virtualip.go
  • client-go/informers/externalversions/storage/v1alpha1/bucket.go
  • client-go/informers/externalversions/storage/v1alpha1/bucketclass.go
  • client-go/informers/externalversions/storage/v1alpha1/bucketpool.go
  • client-go/informers/externalversions/storage/v1alpha1/volume.go
  • client-go/informers/externalversions/storage/v1alpha1/volumeclass.go
  • client-go/informers/externalversions/storage/v1alpha1/volumepool.go
  • client-go/informers/externalversions/storage/v1alpha1/volumesnapshot.go
  • client-go/ironcore/versioned/fake/clientset_generated.go
  • client-go/openapi/zz_generated.openapi.go
  • docs/api-reference/compute.md
  • docs/api-reference/core.md
  • docs/api-reference/ipam.md
  • docs/api-reference/networking.md
  • docs/api-reference/storage.md
  • go.mod
  • hack/api-reference/config.json
  • internal/controllers/compute/suite_test.go
  • internal/controllers/core/core_suite_test.go
  • internal/controllers/ipam/suite_test.go
  • internal/controllers/networking/suite_test.go
  • internal/controllers/storage/suite_test.go
  • irictl-machine/cmd/irictl-machine/irictlmachine/exec/exec.go
  • poollet/bucketpoollet/controllers/controllers_suite_test.go
  • poollet/machinepoollet/controllers/controllers_suite_test.go
  • poollet/volumepoollet/controllers/controllers_suite_test.go

Comment thread client-go/informers/externalversions/factory.go
Comment thread client-go/informers/externalversions/ipam/v1alpha1/prefix.go
Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
internal/admission/plugin/volumeresizepolicy/admission_test.go (1)

42-44: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Consider tolerating AlreadyExists in the retry loop.

If Create succeeds server-side but returns a transient error before the client observes success, a retry with the same fixed object name would fail with AlreadyExists, causing Eventually to keep polling until the 30s timeout instead of recovering. Treating AlreadyExists as success would make the retry more robust.

♻️ Optional hardening
 Eventually(func() error {
-  return k8sClient.Create(ctx, volumeClassExpandOnly)
+  err := k8sClient.Create(ctx, volumeClassExpandOnly)
+  if apierrors.IsAlreadyExists(err) {
+    return nil
+  }
+  return err
 }).WithTimeout(30 * time.Second).WithPolling(pollingInterval).Should(Succeed())

Also applies to: 60-62

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/admission/plugin/volumeresizepolicy/admission_test.go` around lines
42 - 44, The retry loop around k8sClient.Create for volumeClassExpandOnly should
tolerate AlreadyExists as a successful outcome instead of treating it as a hard
failure. Update the Eventually callback to recognize that a retry after a
transient client-side error may hit the same fixed object name and receive
AlreadyExists, and return success in that case. Apply the same handling in the
other Create retry block referenced by the duplicate comment so both test setups
use the same robust behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/admission/plugin/volumeresizepolicy/admission_test.go`:
- Around line 42-44: The retry loop around k8sClient.Create for
volumeClassExpandOnly should tolerate AlreadyExists as a successful outcome
instead of treating it as a hard failure. Update the Eventually callback to
recognize that a retry after a transient client-side error may hit the same
fixed object name and receive AlreadyExists, and return success in that case.
Apply the same handling in the other Create retry block referenced by the
duplicate comment so both test setups use the same robust behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 449b7920-f5e0-4ccc-9c63-e02b0b41d1ae

📥 Commits

Reviewing files that changed from the base of the PR and between 401752c and 864eb0f.

📒 Files selected for processing (1)
  • internal/admission/plugin/volumeresizepolicy/admission_test.go

@afritzler

Copy link
Copy Markdown
Member Author

Waiting for #1505 to land to fix the sporadics.

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade k8s.io/* Dependencies to v0.36.x

1 participant