Browse Source

make volume optional

pull/6625/head
Marcin Szymanski 1 year ago committed by starbirdtech383
parent
commit
718cda35cf
  1. 4
      charts/nocodb/templates/deployment.yaml
  2. 2
      charts/nocodb/templates/pvc.yaml
  3. 1
      charts/nocodb/values.yaml

4
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 }}

2
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 }}

1
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: ""

Loading…
Cancel
Save