Skip to content

Introduce node declared features framework#133389

Merged
k8s-ci-robot merged 9 commits intokubernetes:masterfrom
pravk03:node-capabilities
Nov 6, 2025
Merged

Introduce node declared features framework#133389
k8s-ci-robot merged 9 commits intokubernetes:masterfrom
pravk03:node-capabilities

Conversation

@pravk03
Copy link
Copy Markdown
Contributor

@pravk03 pravk03 commented Aug 5, 2025

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This pull request introduces the Node Declared Features framework - KEP-5328

Which issue(s) this PR is related to:

KEP: kubernetes/enhancements#5347

Special notes for your reviewer:

Does this PR introduce a user-facing change?

This change adds a new alpha feature Node Declared Features, which includes:
- A new `Node.Status.DeclaredFeatures` field for Kubelet to publish node-specific features.
- A library in `component-helpers` for feature registration and inference.
- A scheduler plugin (`NodeDeclaredFeatures`) scheduler plugin to match pods with nodes that provide their required features.
- An admission plugin (`NodeDeclaredFeatureValidator`) to validate pod updates against a node's declared features.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]:  https://github.com/kubernetes/enhancements/pull/5347

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 5, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @pravk03. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot requested review from AxeZhan and dims August 5, 2025 18:57
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 5, 2025
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG Apps Aug 5, 2025
@pravk03 pravk03 changed the title Introduce node capabilities reporting and inferencing framework [WIP] Introduce node capabilities reporting and inferencing framework Aug 5, 2025
@ffromani
Copy link
Copy Markdown
Contributor

ffromani commented Aug 6, 2025

/cc

@k8s-ci-robot k8s-ci-robot requested a review from ffromani August 6, 2025 17:19
@ffromani
Copy link
Copy Markdown
Contributor

ffromani commented Aug 6, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 6, 2025
@pravk03 pravk03 force-pushed the node-capabilities branch 2 times, most recently from 1d15b3a to 02d0205 Compare August 7, 2025 00:35
Comment thread plugin/pkg/admission/nodedeclaredfeatures/admission.go
Comment thread staging/src/k8s.io/component-helpers/nodedeclaredfeatures/types.go Outdated
Comment thread staging/src/k8s.io/component-helpers/nodedeclaredfeatures/types.go
Comment thread plugin/pkg/admission/nodedeclaredfeatures/admission.go Outdated
Comment thread plugin/pkg/admission/nodedeclaredfeatures/admission.go Outdated
Comment thread plugin/pkg/admission/nodedeclaredfeatures/admission.go
Comment thread pkg/apis/core/validation/validation.go
@liggitt
Copy link
Copy Markdown
Member

liggitt commented Nov 4, 2025

/approve
for API bits

@tallclair has lgtm on impl bits

@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 4, 2025

/retest

1 similar comment
@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 4, 2025

/retest

Copy link
Copy Markdown
Member

@tallclair tallclair left a comment

Choose a reason for hiding this comment

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

A couple little things, then LGTM

Comment thread pkg/apis/core/validation/validation.go Outdated
Comment thread pkg/kubelet/kubelet.go
@tallclair
Copy link
Copy Markdown
Member

/lgtm
/approve

/hold
For @macsko review.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 549b006af37acd84c85d8e9cbf4dd9ff1110c386

@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 5, 2025

/retest

1 similar comment
@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 5, 2025

/retest

@tallclair
Copy link
Copy Markdown
Member

Adding back LGTM after rebase
/lgtm

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 36e281b03b6a918831752a7f2d9866059e90e652

@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 5, 2025

/retest

* Reports node declared features in Node.Status.DeclaredFeatures.
* Add kubelet admission handler to check pod required features and match with node declared features on pod creation.
* Checks node declared features on pod updates and emits events if the node does not
  satisfy the pod's feature requirements.
* Adds API validation for node object.
@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 6, 2025

/retest

@macsko
Copy link
Copy Markdown
Member

macsko commented Nov 6, 2025

/lgtm
/approve
Scheduling

@macsko
Copy link
Copy Markdown
Member

macsko commented Nov 6, 2025

/unhold

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 5ecb78dbf744f78c22a80670965537f7f6458d5b

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, macsko, pravk03, tallclair

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

The pull request process is described 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

@pravk03
Copy link
Copy Markdown
Contributor Author

pravk03 commented Nov 6, 2025

Thank you @tallclair, @macsko, and @liggitt for the multiple rounds of review on this PR.

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

Labels

api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/code-generation area/dependency Issues or PRs related to dependency changes area/kubelet area/release-eng Issues or PRs related to the Release Engineering subproject area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

Status: API review completed, 1.35
Archived in project
Archived in project
Archived in project

Development

Successfully merging this pull request may close these issues.