From 4c0656bfa6af0d088dfebc183e4d8e872f7674cf Mon Sep 17 00:00:00 2001 From: mickkael <19755421+mickkael@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:17:00 +0800 Subject: [PATCH] Add nfs option for the persistence Signed-off-by: mickkael <19755421+mickkael@users.noreply.github.com> --- ci/helm-chart/templates/deployment.yaml | 8 ++++++-- ci/helm-chart/templates/pvc.yaml | 2 +- ci/helm-chart/values.yaml | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) 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