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 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.storage.enabled }}
volumeMounts: volumeMounts:
- name: {{ include "nocodb.fullname" . }} - name: {{ include "nocodb.fullname" . }}
mountPath: /usr/app/data mountPath: /usr/app/data
{{- end }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "nocodb.fullname" . }} name: {{ include "nocodb.fullname" . }}
@ -67,7 +69,9 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.storage.enabled }}
volumes: volumes:
- name: {{ include "nocodb.fullname" . }} - name: {{ include "nocodb.fullname" . }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ include "nocodb.fullname" . }} claimName: {{ include "nocodb.fullname" . }}
{{- end }}

2
charts/nocodb/templates/pvc.yaml

@ -1,3 +1,4 @@
{{ if .Values.storage.enabled }}
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
@ -12,3 +13,4 @@ spec:
accessModes: accessModes:
{{- default (toYaml .Values.storage.accessModes) "- ReadWriteMany" | nindent 4 }} {{- default (toYaml .Values.storage.accessModes) "- ReadWriteMany" | nindent 4 }}
volumeMode: Filesystem volumeMode: Filesystem
{{ end }}

1
charts/nocodb/values.yaml

@ -86,6 +86,7 @@ extraSecretEnvs:
NC_DB: "mysql2://mysql:3306?u=nocodb&p=secretPass&d=nocodb" NC_DB: "mysql2://mysql:3306?u=nocodb&p=secretPass&d=nocodb"
storage: storage:
enabled: true
size: 3Gi size: 3Gi
storageClassName: "" storageClassName: ""

Loading…
Cancel
Save