-
Notifications
You must be signed in to change notification settings - Fork 540
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
[Feature] Add a Filter plugin to ensure that non-GPU pods are not sch… #788
base: master
Are you sure you want to change the base?
Conversation
…eduled on GPU nodes
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
Welcome @Zeel-Patel! |
Hi @Zeel-Patel. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Zeel-Patel The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-scheduler-plugins canceled.
|
//devicePluginContainerImage is the nvidia provided kubernetes device plugin image. | ||
devicePluginContainerImage = "nvcr.io/nvidia/k8s-device-plugin" | ||
|
||
// ResourceNvidiaGPU is nvidia GPU resource | ||
ResourceNvidiaGPU = "nvidia.com/gpu" |
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 think we should move both of those values so they can be changed via configuration file. Some clusters may also have more than one gpu resource on the node, so it would be great if we could provide a list of gpu resources.
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.
+1, Using configuration files is better than hard-coding. Maybe we don't need to limit ourselves to GPU resources, can we extend it to different resources?
Overall I think this could be a generic plugin that filters out pod not requesting some specific resource from nodes advertising those resources with except for |
/ok-to-test |
@Zeel-Patel: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@@ -0,0 +1,129 @@ | |||
package gpumanagementfilter |
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 we have a KEP document?
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.
Sure, let me write a KEP doc first
/kind feature |
@PiotrProkop sure, can you provide more info on what you mean by |
Same idea what this func does: func containsNvidiaDevicePluginImage(containerList []v1.Container) bool {
for _, containerItem := range containerList {
if strings.Contains(containerItem.Image, devicePluginContainerImage) {
return true
}
}
return false
} make this filter plugin not fail device-plugins that provides given resource for other pods :) |
/cc +1 for having a design document/KEP |
strong agree. It seems there is a easy (and safe?) generalization path for this filter plugin. We can have allowlist/denylist in the plugin. |
@PiotrProkop @googs1025 @zwpaper @ffromani Here is the PR with the KEP doc |
…eduled on GPU nodes
This plugin is widely being used at Uber and thought can be useful for open source community.
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?