-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xy] Support provisioning PVC in helm chart.
- Loading branch information
1 parent
189d6d9
commit 51fe550
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{{- if and .Values.persistence .Values.persistence.enabled -}} | ||
|
||
{{- if not .Values.persistence.dynamicProvisioning }} | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: pv-{{ include "mageai.fullname" . }} | ||
labels: | ||
deployment: {{ include "mageai.fullname" . }} | ||
spec: | ||
capacity: | ||
storage: {{ .Values.persistence.size}} | ||
volumeMode: Filesystem | ||
accessModes: | ||
- ReadWriteMany | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: {{ .Values.persistence.storageClassName}} | ||
{{- with .Values.persistence.csi }} | ||
csi: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: pvc-{{ include "mageai.fullname" . }} | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
storageClassName: {{ .Values.persistence.storageClassName}} | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.size}} | ||
{{- if not .Values.persistence.dynamicProvisioning }} | ||
selector: | ||
matchLabels: | ||
deployment: {{ include "mageai.fullname" . }} | ||
{{- end}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters