Skip to content

Commit

Permalink
[Helm] Added StorageClass in PVC template (#141)
Browse files Browse the repository at this point in the history
* [FEAT] Enabled adding storageclass in PVC

Signed-off-by: Hanchenli <[email protected]>

* fixed precommit

Signed-off-by: Hanchenli <[email protected]>

* Fixed Storage class

Signed-off-by: Hanchenli <[email protected]>

---------

Signed-off-by: Hanchenli <[email protected]>
  • Loading branch information
Hanchenli authored Feb 17, 2025
1 parent 432a62e commit f125a14
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.5
version: 0.0.6

maintainers:
- name: apostac
16 changes: 14 additions & 2 deletions helm/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@ metadata:
name: "{{ .Release.Name }}-{{$modelSpec.name}}-storage-claim"
namespace: {{ .Release.Namespace }}
spec:
accessModes: {{ toYaml $modelSpec.pvcAccessMode | nindent 4 }}
accessModes:
{{- if $modelSpec.pvcAccessMode }}
{{- toYaml $modelSpec.pvcAccessMode | nindent 4 }}
{{- else }}
- ReadWriteOnce
{{- end }}
resources:
requests:
storage: {{ $modelSpec.pvcStorage }}
storage: {{ $modelSpec.pvcStorage | default "40Gi" }} # Default to 40Gi if not set
{{- if $modelSpec.storageClass }}
{{- if eq $modelSpec.storageClass "efs_static_storage_class_indicator" }}
storageClassName: ""
{{- else }}
storageClassName: "{{ $modelSpec.storageClass }}"
{{- end }}
{{- end }}
{{- if not (empty $modelSpec.pvcMatchLabels) }}
selector:
matchLabels:
Expand Down
1 change: 1 addition & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ servingEngineSpec:
#
# - pvcStorage: (string) The amount of storage requested for the model, e.g., "50Gi"
# - pvcAccessMode: (list) The access mode policy for the mounted volume, e.g., ["ReadWriteOnce"]
# - storageClass: (String) The storage class of the PVC e.g., "", default is ""
# - pvcMatchLabels: (optional, map) The labels to match the PVC, e.g., {model: "opt125m"}
#
# - vllmConfig: (optional, map) The configuration for the VLLM model, supported options are:
Expand Down

0 comments on commit f125a14

Please sign in to comment.