Skip to content

Rename DRA feature gates to avoid conflict with upstream Kubernetes gates#11255

Open
sohankunkerkar wants to merge 1 commit into
kubernetes-sigs:mainfrom
sohankunkerkar:rename-dra-feature-gates
Open

Rename DRA feature gates to avoid conflict with upstream Kubernetes gates#11255
sohankunkerkar wants to merge 1 commit into
kubernetes-sigs:mainfrom
sohankunkerkar:rename-dra-feature-gates

Conversation

@sohankunkerkar
Copy link
Copy Markdown
Member

@sohankunkerkar sohankunkerkar commented May 16, 2026

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):

Old (deprecated in 0.18) New
DynamicResourceAllocation KueueDRAIntegration
DRAExtendedResources KueueDRAIntegrationExtendedResource

Upgrade scenarios

From User config What happens
0.14–0.16 DynamicResourceAllocation: true Deprecation warning logged. Migrated → KueueDRAIntegration=true. DRA works.
0.17 DynamicResourceAllocation: true, DRAExtendedResources: true Both deprecated warnings logged. Both migrated to new names. DRA works.
0.17 Updates config to KueueDRAIntegration: true, KueueDRAIntegrationExtendedResource: true No migration needed. No warnings. DRA works.
0.18 fresh KueueDRAIntegration: true No migration needed. DRA works.
Mixed DynamicResourceAllocation: true, KueueDRAIntegration: false (explicit) Canonical gate wins (ExplicitlySet check). DRA disabled per user intent.
Invalid 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) intentionally
keeps old gate names to exercise the migration path. The DRA e2e tests pass with this config.

Does this PR introduce a user-facing change?

NONE

Copilot AI review requested due to automatic review settings May 16, 2026 05:20
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 16, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit e277533
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/6a08c8a78c1ab700088e9088
😎 Deploy Preview https://deploy-preview-11255--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 16, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sohankunkerkar
Once this PR has been reviewed and has the lgtm label, please assign gabesaba for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from mimowo and olekzabl May 16, 2026 05:20
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 16, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames Kueue's DRA-related feature gates (DynamicResourceAllocationKueueDRAIntegration, DRAExtendedResourcesKueueDRAIntegrationExtendedResource) 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 a MigrateDeprecatedDRAFeatureGates helper invoked from cmd/kueue/main.go before 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 Validate to require KueueDRAIntegration whenever KueueDRAIntegrationExtendedResource is enabled, and updated the legacy DRAExtendedResources check 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.

@sohankunkerkar sohankunkerkar force-pushed the rename-dra-feature-gates branch 2 times, most recently from 2f7d8fb to 5fb1c87 Compare May 16, 2026 06:12
@sohankunkerkar sohankunkerkar force-pushed the rename-dra-feature-gates branch from 5fb1c87 to e277533 Compare May 16, 2026 19:42
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-none Denotes a PR that doesn't merit a release note. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename DynamicResourceAllocation to avoid conflict with k8s FGs

3 participants