Rename DRA feature gates to avoid conflict with upstream Kubernetes gates#11255
Rename DRA feature gates to avoid conflict with upstream Kubernetes gates#11255sohankunkerkar wants to merge 1 commit into
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sohankunkerkar The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Renames Kueue's DRA-related feature gates (DynamicResourceAllocation → KueueDRAIntegration, DRAExtendedResources → KueueDRAIntegrationExtendedResource) to avoid name collisions with upstream Kubernetes feature gates. The old names are kept as Deprecated aliases for one release with an automatic migration step on startup.
Changes:
- Added new canonical feature gate names and marked the old ones
Deprecated(to be removed in 0.19), with aMigrateDeprecatedDRAFeatureGateshelper invoked fromcmd/kueue/main.gobefore config validation. - Updated all internal call sites (controllers, cache, dra, workload, validation), tests, KEP, site docs, and versioned feature list to use the new names.
- Extended
Validateto requireKueueDRAIntegrationwheneverKueueDRAIntegrationExtendedResourceis enabled, and updated the legacyDRAExtendedResourcescheck to accept either gate.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/features/kube_features.go | Adds new gate names, marks old ones Deprecated, and adds migration helper. |
| cmd/kueue/main.go | Calls migration before validation; uses new gate name for DRA mapper init. |
| pkg/config/validation.go | New validateDRAFeatureGateDependencies checking both new and legacy gate combinations. |
| pkg/config/validation_test.go | Replaces legacy dependency test with one for the new gate names. |
| pkg/controller/core/{core,workload_controller,indexer/indexer}.go | Switches gate references to new names; updates user-visible inadmissibility message. |
| pkg/controller/core/workload_controller_test.go | Updates fixtures to new gate names and expected message. |
| pkg/cache/queue/cluster_queue.go, pkg/dra/extended_resources.go, pkg/workload/workload*.go | Switches gate references to new names. |
| test/integration/.../dra/{suite_test,dra_test}.go, fairsharing/suite_test.go, multikueue/dra_test.go | Updates feature-gate names in integration tests. |
| keps/2941-DRA/kep.yaml | Replaces gate names in KEP metadata. |
| site/content/en/docs/{concepts/dynamic_resource_allocation,tasks/manage/setup_dra,tasks/run/dra}.md | Documents the rename and updates examples/text. |
| site/data/featuregates/versioned_feature_list.yaml, test/compatibility_lifecycle/reference/versioned_feature_list.yaml | Adds 0.18 Deprecated entries for old gates and Alpha entries for new ones. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2f7d8fb to
5fb1c87
Compare
5fb1c87 to
e277533
Compare
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Renames DRA feature gates to avoid name collisions with upstream Kubernetes feature gates
(see #8871 for the scheduler-library integration where this became problematic):
DynamicResourceAllocationKueueDRAIntegrationDRAExtendedResourcesKueueDRAIntegrationExtendedResourceUpgrade scenarios
DynamicResourceAllocation: trueKueueDRAIntegration=true. DRA works.DynamicResourceAllocation: true, DRAExtendedResources: trueKueueDRAIntegration: true, KueueDRAIntegrationExtendedResource: trueKueueDRAIntegration: trueDynamicResourceAllocation: true, KueueDRAIntegration: false(explicit)ExplicitlySetcheck). DRA disabled per user intent.KueueDRAIntegrationExtendedResource: true(no base gate)Validate()rejects: "requires KueueDRAIntegration to be enabled". Startup fails.Which issue(s) this PR fixes:
Fixes #11248
Special notes for your reviewer:
The e2e DRA config (
test/e2e/config/dra/controller_manager_config.yaml) intentionallykeeps old gate names to exercise the migration path. The DRA e2e tests pass with this config.
Does this PR introduce a user-facing change?