-
Improvement
-
Resolution: Unresolved
-
Minor
Description
Currently, it is not possible to add custom resource limits to kubernetes containers unless you write raw yaml.
A rudimentary example would be:
... containers: - name: NAME ... resources: limits: nvidia.com/gpu: 1 # requesting 1 GPU ...
Here the last line cannot be added easily with the interface.
Possible Solution
Add this functionality similar to the EnvVars variable, where multiple limits can be defined by hand with name and value. So basically replace EnvVars with limits in the following screenshot:
Additional Context
A complete example (not for jenkins) would be:
apiVersion: v1 kind: Pod metadata: name: cuda-vector-add namespace: nvidia spec: restartPolicy: OnFailure serviceAccount: nvidia-deviceplugin serviceAccountName: nvidia-deviceplugin containers: - name: cuda-vector-add image: "docker.io/mirrorgooglecontainers/cuda-vector-add:v0.1" env: - name: NVIDIA_VISIBLE_DEVICES value: all - name: NVIDIA_DRIVER_CAPABILITIES value: "compute,utility" - name: NVIDIA_REQUIRE_CUDA value: "cuda>=5.0" securityContext: privileged: true resources: limits: nvidia.com/gpu: 1 # requesting 1 GPU
the yaml option is there so we don't need to write new ui/methods for each possible k8s api option