Skip to content

Commit

Permalink
Allow setting PAAS namespace GPU limits (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored Nov 27, 2024
1 parent ca9ea76 commit 9613d64
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/paas/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: paas
description: OSC PAAS bootstrap Helm Chart
type: application
version: 0.3.0
version: 0.4.0
appVersion: "0.1.0"
maintainers:
- name: treydock
Expand Down
5 changes: 4 additions & 1 deletion charts/paas/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# paas

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

OSC PAAS bootstrap Helm Chart

Expand Down Expand Up @@ -40,6 +40,7 @@ namespaces:
cpuDefault: '1'
memoryLimit: '16Gi'
memoryDefault: '2Gi'
gpuLimit: '1'
imagePullSecret:
username: testuser
password: password
Expand All @@ -58,6 +59,7 @@ namespaces:
| cpuDefault | The default CPU request for this namespace | `1` |
| memoryLimit | The max memory this namespace can consume | `8Gi` |
| memoryDefault | The default memory request for this namespace | `2Gi` |
| gpuLimit | The max GPUs this namespace can consume | `0` |
| imagePullSecret.username | The username used to access the registry | **required** if `imagePullSecret` defined |
| imagePullSecret.password | The password used to access the registry | **required** if `imagePullSecret` defined |

Expand All @@ -72,3 +74,4 @@ namespaces:
| default.cpu | The default CPU request for PAAS namespace pods | `"1"` |
| default.memoryLimit | The default memory limit for PAAS namespaces | `"8Gi"` |
| default.memory | The default memory request for PAAS namespace pods | `"2Gi"` |
| default.gpuLimit | The default GPU limit for PAAS namespaces | `"0"` |
2 changes: 2 additions & 0 deletions charts/paas/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespaces:
cpuDefault: '1'
memoryLimit: '16Gi'
memoryDefault: '2Gi'
gpuLimit: '1'
imagePullSecret:
username: testuser
password: password
Expand All @@ -55,6 +56,7 @@ namespaces:
| cpuDefault | The default CPU request for this namespace | `1` |
| memoryLimit | The max memory this namespace can consume | `8Gi` |
| memoryDefault | The default memory request for this namespace | `2Gi` |
| gpuLimit | The max GPUs this namespace can consume | `0` |
| imagePullSecret.username | The username used to access the registry | **required** if `imagePullSecret` defined |
| imagePullSecret.password | The password used to access the registry | **required** if `imagePullSecret` defined |

Expand Down
2 changes: 2 additions & 0 deletions charts/paas/templates/quotas-limits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ spec:
hard:
requests.cpu: {{ $namespace.cpuLimit | default $.Values.default.cpuLimit | quote }}
requests.memory: {{ $namespace.memoryLimit | default $.Values.default.memoryLimit | quote }}
requests.nvidia.com/gpu: {{ $namespace.gpuLimit | default $.Values.default.gpuLimit | quote }}
limits.cpu: {{ $namespace.cpuLimit | default $.Values.default.cpuLimit | quote }}
limits.memory: {{ $namespace.memoryLimit | default $.Values.default.memoryLimit | quote }}
limits.nvidia.com/gpu: {{ $namespace.gpuLimit | default $.Values.default.gpuLimit | quote }}
---
apiVersion: v1
kind: LimitRange
Expand Down
2 changes: 2 additions & 0 deletions charts/paas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ default:
memoryLimit: '8Gi'
# -- The default memory request for PAAS namespace pods
memory: '2Gi'
# -- The default GPU limit for PAAS namespaces
gpuLimit: '0'

0 comments on commit 9613d64

Please sign in to comment.