Skip to content

Commit bb503e5

Browse files
authored
[stable/nextcloud] Create option to specify extra deployment volumes (helm#22293)
* Create option to specify extra deployment volumes This is useful when converting from a legacy NextCloud environment to Kubernetes. Our deployment has data stored in an NFS volume. Using these new options, we can now directly import that volume into our Kubernetes NextCloud pods and migrate the data more easily (or even run the new pods with the old storage). Signed-off-by: Ben Klang <[email protected]> * Chart version bump Signed-off-by: Ben Klang <[email protected]>
1 parent d01da69 commit bb503e5

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

stable/nextcloud/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: nextcloud
3-
version: 1.9.6
3+
version: 1.10.0
44
appVersion: 17.0.0
55
description: A file sharing server that puts the control and security of your own data back into your hands.
66
keywords:

stable/nextcloud/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ The following table lists the configurable parameters of the nextcloud chart and
8282
| `nextcloud.defaultConfigs.\.autoconfig\.php` | Default auto-configuration for databases | `true` |
8383
| `nextcloud.defaultConfigs.\.smtp\.config\.php` | Default configuration for smtp | `true` |
8484
| `nextcloud.extraEnv` | specify additional environment variables | `{}` |
85+
| `nextcloud.extraVolumes` | specify additional volumes for the NextCloud pod | `{}` |
86+
| `nextcloud.extraVolumeMounts` | specify additional volume mounts for the NextCloud pod | `{}` |
8587
| `nginx.enabled` | Enable nginx (requires you use php-fpm image) | `false` |
8688
| `nginx.image.repository` | nginx Image name | `nginx` |
8789
| `nginx.image.tag` | nginx Image tag | `alpine` |

stable/nextcloud/templates/deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ spec:
241241
mountPath: /usr/local/etc/php/conf.d/{{ $key }}
242242
subPath: {{ $key }}
243243
{{- end }}
244+
{{- if .Values.nextcloud.extraVolumeMounts }}
245+
{{ toYaml .Values.nextcloud.extraVolumeMounts | indent 8 }}
246+
{{- end }}
244247
{{- if .Values.nginx.enabled }}
245248
- name: {{ .Chart.Name }}-nginx
246249
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}"
@@ -340,6 +343,9 @@ spec:
340343
configMap:
341344
name: {{ template "nextcloud.fullname" . }}-nginxconfig
342345
{{- end }}
346+
{{- if .Values.nextcloud.extraVolumes }}
347+
{{ toYaml .Values.nextcloud.extraVolumes | indent 6 }}
348+
{{- end }}
343349
{{- if .Values.nginx.enabled }}
344350
# Will mount configuration files as www-data (id: 82) for nextcloud
345351
securityContext:

stable/nextcloud/values.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,18 @@ nextcloud:
134134
# name: nextcloud
135135
# key: secret_key
136136

137+
# Extra mounts for the pods. Example shown is for connecting a legacy NFS volume
138+
# to NextCloud pods in Kubernetes. This can then be configured in External Storage
139+
extraVolumes:
140+
# - name: nfs
141+
# nfs:
142+
# server: "10.0.0.1"
143+
# path: "/nextcloud_data"
144+
# readOnly: false
145+
extraVolumeMounts:
146+
# - name: nfs
147+
# mountPath: "/legacy_data"
148+
137149
nginx:
138150
## You need to set an fpm version of the image for nextcloud if you want to use nginx!
139151
enabled: false

0 commit comments

Comments
 (0)