mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Changes nvidia-gpu device plugin addon config settings:
- Runs as system critical pod - Makes resource limits to match its resource requets - Modifies test/e2e/scheduling/nvidia-gpus.go to cope with the recent change of running the device plugin as a system addon. - The resource settings of the addon is based on the test results from 8 nvidia-tesla-k80 gpus.
This commit is contained in:
parent
849d7f8595
commit
4a1a205109
@ -11,7 +11,10 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: nvidia-gpu-device-plugin
|
k8s-app: nvidia-gpu-device-plugin
|
||||||
|
annotations:
|
||||||
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
spec:
|
spec:
|
||||||
|
priorityClassName: system-node-critical
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
@ -34,7 +37,10 @@ spec:
|
|||||||
name: nvidia-gpu-device-plugin
|
name: nvidia-gpu-device-plugin
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 50m
|
||||||
|
memory: 10Mi
|
||||||
|
limits:
|
||||||
|
cpu: 50m
|
||||||
memory: 10Mi
|
memory: 10Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
@ -183,6 +183,11 @@ func testNvidiaGPUsOnCOS(f *framework.Framework) {
|
|||||||
|
|
||||||
pods, err := framework.WaitForControlledPods(f.ClientSet, ds.Namespace, ds.Name, extensionsinternal.Kind("DaemonSet"))
|
pods, err := framework.WaitForControlledPods(f.ClientSet, ds.Namespace, ds.Name, extensionsinternal.Kind("DaemonSet"))
|
||||||
framework.ExpectNoError(err, "getting pods controlled by the daemonset")
|
framework.ExpectNoError(err, "getting pods controlled by the daemonset")
|
||||||
|
devicepluginPods, err := framework.WaitForControlledPods(f.ClientSet, "kube-system", "nvidia-gpu-device-plugin", extensionsinternal.Kind("DaemonSet"))
|
||||||
|
if err == nil {
|
||||||
|
framework.Logf("Adding deviceplugin addon pod.")
|
||||||
|
pods.Items = append(pods.Items, devicepluginPods.Items...)
|
||||||
|
}
|
||||||
framework.Logf("Starting ResourceUsageGather for the created DaemonSet pods.")
|
framework.Logf("Starting ResourceUsageGather for the created DaemonSet pods.")
|
||||||
rsgather, err := framework.NewResourceUsageGatherer(f.ClientSet, framework.ResourceGathererOptions{false, false, 2 * time.Second, 2 * time.Second, true}, pods)
|
rsgather, err := framework.NewResourceUsageGatherer(f.ClientSet, framework.ResourceGathererOptions{false, false, 2 * time.Second, 2 * time.Second, true}, pods)
|
||||||
framework.ExpectNoError(err, "creating ResourceUsageGather for the daemonset pods")
|
framework.ExpectNoError(err, "creating ResourceUsageGather for the daemonset pods")
|
||||||
|
Loading…
Reference in New Issue
Block a user