-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFD image compatibility proposal #1845
NFD image compatibility proposal #1845
Conversation
Welcome @mfranczy! |
Hi @mfranczy. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
✅ Deploy Preview for kubernetes-sigs-nfd ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/cc @ArangoGutierrez |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recognize all of this work! Thanks for opening this up @mfranczy - looks good to me. 👍
|
||
- `validate` - validate a NodeFeatureRule object (implemented in kubectl plugin). | ||
- `test` - test a NodeFeatureRule object against a node (implemented in kubectl plugin). | ||
- `dryrun` - DryRun a NodeFeatureRule object against a NodeFeature file (implemented in kubectl plugin). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you better explain "dryrun" ? I'm used to seeing it as --dryrun
to supplement a more clearly obvious action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also used to see it as you. I kept it that way to be compatibile with the kubectl dryrun
command.
I am in the process of building nfd client prototype. I reduced the scope with commands. ORAS SDK provides a lot of useful functions so there is no need to introduce much for artifact manipulation (thanks ORAS folks!). |
Thanks @mfranczy for the proposal. Just thinking aloud below, not proposing anything or having any answers. It looks like we need to rely on node labels to be able to integrate this with the kubernetes components (scheduler etc). If we want to do without changes to the kubernetes API or extend the kubernetes components with some plugins looking at NFD CRDs (or similar) or something exotic like that. What we need to think is the node label management on NFD side. We have a bunch of built-in labels (that get populated by just deploying NFD) but a lot of stuff is only visible in NodeFeatures only. For automatizing the creation NodeFeatureRules (a future, step, yes) we need to understand what we get automatically, from the built-in-labels and what we need custom labels for. We could use namespacing e.g. prefix all image compatibility labels with Regarding the expressions, would CEL (or parts of it) be useful there? |
@marquiz thanks for looking into it.
I think looking at NFD CRDs would be a good choice for start.
Right, a few missing pieces I already identified, like discovery of runtime configuration (
Looks very promising, I think we could use it. That's a good idea. |
A node don't know what images(not only one, usually many) will run on it until the image is scheduled to the node, and each image's compatibility may require different set of node features, it is difficult to set node feature rules to label node automatically. Considering the danymic situation, extending scheduler with plugin to validate the image compatibility and node features seems to be more viable. |
In that context agree - the scheduler would determine compatibility, but then the container runtime doing the pull would do so based on more fine-grained selection for optional performance. It would be scoped to what the scheduler scoped it to (architecture, GPU and devices, etc). |
@marquiz I will try to implement this in the prototype and will inform if there is anything that stops us to use CEL. |
@marquiz there is nothing that prevents to add extra fields for CEL expressions in the spec. However, @marquiz @ArangoGutierrez after looking deeply into NodeFeatureRules, I believe we could just use the rules object (or part of it) to describe image requirements in the artifact. It provides everything what we need to describe image requirements, it already allows to use expressions, it's possible to set a custom hierarchy, it operates directly on features and most important we don't need to create any complex translator from the new spec to NFR for the deployment in k8s cluster. If you're ok with the idea then I would update the proposal to include NFR rules object into compatibility artifact. |
In principle, I like this idea. That just means that the Kubernetes needs to be made aware of this stuff which complicates matters in the short term. With this, I also agree with @ChaoyiHuang @vsoch that integrating this in the kubernetes control plane (with new functionality, say a scheduler plugin) is a more viable and maintainable solution for the longer term |
a13303b
to
6316d50
Compare
@marquiz @ArangoGutierrez I have updated the proposal based on our discussion and consider it complete from my side. |
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
6316d50
to
f435c1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marquiz I think we can get this KEP in and start working on code right?
@mfranczy this would be good to get in, does it need to be updated wrt to the latest code PR`? |
It doesn't have to be updated. The proposed API is still the same and the proposal doesn't include any deep implementation suggestions. It can go as it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mfranczy for writing the proposal. Let's get this in before the impl.
/ok-to-test
/lgtm
LGTM label has been added. Git tree hash: 2dd871deaebb2b00214a87ab11943b930311e73e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ArangoGutierrez, marquiz, mfranczy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposal to describe image requirements by using NFD labels and OCI artifact.