From 718cda35cf01d65c65555138282eedbe6532a7e0 Mon Sep 17 00:00:00 2001 From: Marcin Szymanski Date: Tue, 26 Sep 2023 13:56:45 +0100 Subject: [PATCH] make volume optional --- charts/nocodb/templates/deployment.yaml | 4 ++++ charts/nocodb/templates/pvc.yaml | 2 ++ charts/nocodb/values.yaml | 1 + 3 files changed, 7 insertions(+) diff --git a/charts/nocodb/templates/deployment.yaml b/charts/nocodb/templates/deployment.yaml index 582d365df8..785b0adf0f 100644 --- a/charts/nocodb/templates/deployment.yaml +++ b/charts/nocodb/templates/deployment.yaml @@ -33,9 +33,11 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.storage.enabled }} volumeMounts: - name: {{ include "nocodb.fullname" . }} mountPath: /usr/app/data + {{- end }} envFrom: - configMapRef: name: {{ include "nocodb.fullname" . }} @@ -67,7 +69,9 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.storage.enabled }} volumes: - name: {{ include "nocodb.fullname" . }} persistentVolumeClaim: claimName: {{ include "nocodb.fullname" . }} + {{- end }} diff --git a/charts/nocodb/templates/pvc.yaml b/charts/nocodb/templates/pvc.yaml index 092a1b0439..369480f057 100644 --- a/charts/nocodb/templates/pvc.yaml +++ b/charts/nocodb/templates/pvc.yaml @@ -1,3 +1,4 @@ +{{ if .Values.storage.enabled }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -12,3 +13,4 @@ spec: accessModes: {{- default (toYaml .Values.storage.accessModes) "- ReadWriteMany" | nindent 4 }} volumeMode: Filesystem +{{ end }} diff --git a/charts/nocodb/values.yaml b/charts/nocodb/values.yaml index 881e31cdbb..072be2f7c5 100644 --- a/charts/nocodb/values.yaml +++ b/charts/nocodb/values.yaml @@ -86,6 +86,7 @@ extraSecretEnvs: NC_DB: "mysql2://mysql:3306?u=nocodb&p=secretPass&d=nocodb" storage: + enabled: true size: 3Gi storageClassName: ""