Gate DRA reconciler on Kubernetes >= 1.34#1300
Merged
kubernetes-prow[bot] merged 1 commit intoJul 1, 2026
Merged
Conversation
The DRA reconciler was registered unconditionally, which would crash the entire operator on clusters older than 1.34 because the resource.k8s.io/v1 DeviceClass API does not exist there. Introduce an internal/version package with KubeVersion, DiscoverKubeVersion, and an AtLeast method to centralise version discovery and comparison. The manager now checks the cluster version at startup and only registers the DRA controller when the minimum version is met. The webhook package is updated to use the shared version package instead of its own local types. Also fixes a pre-existing bug where /run was missing from the allowed hostPath prefixes error message.
✅ Deploy Preview for kubernetes-sigs-kmm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TomerNewman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1300 +/- ##
==========================================
- Coverage 79.09% 73.73% -5.36%
==========================================
Files 51 68 +17
Lines 5109 5114 +5
==========================================
- Hits 4041 3771 -270
- Misses 882 1170 +288
+ Partials 186 173 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
/lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The DRA reconciler was registered unconditionally, which would crash the entire operator on clusters older than 1.34 because the resource.k8s.io/v1 DeviceClass API does not exist there.
Introduce an internal/version package with KubeVersion, DiscoverKubeVersion, and an AtLeast method to centralise version discovery and comparison. The manager now checks the cluster version at startup and only registers the DRA controller when the minimum version is met. The webhook package is updated to use the shared version package instead of its own local types.
Also fixes a pre-existing bug where /run was missing from the allowed hostPath prefixes error message.
/cc @ybettan @yevgeny-shnaidman
/assign @ybettan @yevgeny-shnaidman