diff --git a/ci/helm-chart/templates/deployment.yaml b/ci/helm-chart/templates/deployment.yaml index 18bece028fc6..2e567421dad7 100644 --- a/ci/helm-chart/templates/deployment.yaml +++ b/ci/helm-chart/templates/deployment.yaml @@ -155,13 +155,17 @@ spec: volumes: - name: data {{- if .Values.persistence.enabled }} - {{- if not .Values.persistence.hostPath }} + {{- if and (not .Values.persistence.hostPath) (not .Values.persistence.nfs) }} persistentVolumeClaim: claimName: {{ .Values.persistence.existingClaim | default (include "code-server.fullname" .) }} - {{- else }} + {{- else if .Values.persistence.hostPath }} hostPath: path: {{ .Values.persistence.hostPath }} type: Directory + {{- else if .Values.persistence.nfs }} + nfs: + server: {{ .Values.persistence.nfs.server }} + path: {{ .Values.persistence.nfs.path }} {{- end -}} {{- else }} emptyDir: {} diff --git a/ci/helm-chart/templates/pvc.yaml b/ci/helm-chart/templates/pvc.yaml index 206b834e930d..718e89388210 100644 --- a/ci/helm-chart/templates/pvc.yaml +++ b/ci/helm-chart/templates/pvc.yaml @@ -1,4 +1,4 @@ -{{- if and (and .Values.persistence.enabled (not .Values.persistence.existingClaim)) (not .Values.persistence.hostPath) }} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (not .Values.persistence.hostPath) (not .Values.persistence.nfs) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml index a0d74c168242..5ac8f87b2e95 100644 --- a/ci/helm-chart/values.yaml +++ b/ci/helm-chart/values.yaml @@ -145,6 +145,9 @@ persistence: annotations: {} # existingClaim: "" # hostPath: /data + # nfs: + # server: + # path: lifecycle: enabled: false