Commit 4a1a2051 authored by Jiaying Zhang's avatar Jiaying Zhang

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.
parent 849d7f85
...@@ -11,7 +11,10 @@ spec: ...@@ -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: ...@@ -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) { ...@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment