Skip to content

Allow overwrite “accessModes” to support AWS ebs for k8s volumes #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions charts/mageai/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
value: postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Values.postgresql.fullnameOverride }}:5432/{{ .Values.postgresql.auth.database }}
{{- end }}
volumeMounts:
{{- if .Values.volumes }}
{{- if or .Values.volumes (and .Values.persistence .Values.persistence.enabled) }}
- name: mage-fs
mountPath: /home/src
{{- else if .Values.extraVolumeMounts }}
Expand All @@ -140,9 +140,15 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if and .Values.persistence .Values.persistence.enabled }}
- name: mage-fs
persistentVolumeClaim:
claimName: "pvc-{{ include "mageai.fullname" . }}"
{{- end }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
{{- else if .Values.extraVolumes -}}
{{- end }}
{{- if .Values.extraVolumes -}}
{{ toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/mageai/templates/pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
storage: {{ .Values.persistence.size}}
volumeMode: Filesystem
accessModes:
- ReadWriteMany
{{- toYaml .Values.persistence.accessModes | nindent 4 }}
persistentVolumeReclaimPolicy: Retain
storageClassName: {{ .Values.persistence.storageClassName}}
{{- with .Values.persistence.csi }}
Expand All @@ -28,7 +28,7 @@ metadata:
name: pvc-{{ include "mageai.fullname" . }}
spec:
accessModes:
- ReadWriteMany
{{- toYaml .Values.persistence.accessModes | nindent 4 }}
storageClassName: {{ .Values.persistence.storageClassName}}
resources:
requests:
Expand Down
20 changes: 13 additions & 7 deletions charts/mageai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,25 @@ tolerations: []

affinity: {}

extraVolumeMounts:
- name: mage-fs
mountPath: /home/src
# Configure extra volumes.
extraVolumes: []
# - name: mage-fs
# mountPath: /home/src

# Configure extra volume mounts to provide persistence for additional paths in the container's file system.
extraVolumeMounts: []
# - name: mage-fs
# hostPath:
# path: /path/to/mage_project

extraVolumes:
- name: mage-fs
hostPath:
path: /path/to/mage_project

persistence:
enabled: false
storageClassName: storage-class-name
size: 5Gi
accessModes:
- ReadWriteMany
# dynamicProvisioning: true
# csi:
# driver: efs.csi.aws.com
# volumeHandle: fs-0123456789
Expand Down