Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ The following table lists the configurable parameters of the nextcloud chart and
| `nextcloud.mail.smtp.password` | SMTP password | `''` |
| `nextcloud.configs` | Config files created in `/var/www/html/config` | `{}` |
| `nextcloud.persistence.subPath` | Set the subPath for nextcloud to use in volume | `nil` |
| `nextcloud.persistence.useImageCode` | Skip `/var/www` and `/var/www/html` mounts when using a custom image with code baked in | `false` |
| `nextcloud.phpConfigs` | PHP Config files created in `/usr/local/etc/php/conf.d` | `{}` |
| `nextcloud.defaultConfigs.\.htaccess` | Default .htaccess to protect `/var/www/html/config` | `true` |
| `nextcloud.defaultConfigs.apache-pretty-urls\.config\.php` | Default Apache configuration for rewrite urls | `true` |
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,14 @@ Swift as primary object store env vars
Create volume mounts for the nextcloud container as well as the cron sidecar container.
*/}}
{{- define "nextcloud.volumeMounts" -}}
{{- if not .Values.nextcloud.persistence.useImageCode }}
- name: nextcloud-main
mountPath: /var/www/
subPath: {{ ternary "root" (printf "%s/root" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
- name: nextcloud-main
mountPath: /var/www/html
subPath: {{ ternary "html" (printf "%s/html" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
{{- end }}
{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
- name: nextcloud-data
mountPath: {{ .Values.nextcloud.datadir }}
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,14 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if not .Values.nextcloud.persistence.useImageCode }}
- name: nextcloud-main
mountPath: /var/www/
subPath: {{ ternary "root" (printf "%s/root" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
- name: nextcloud-main
mountPath: /var/www/html
subPath: {{ ternary "html" (printf "%s/html" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
{{- end }}
{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
- name: nextcloud-data
mountPath: {{ .Values.nextcloud.datadir }}
Expand Down
4 changes: 4 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ nextcloud:
datadir: /var/www/html/data
persistence:
subPath:
# Set to true when using an image with code baked in (no VOLUME /var/www/html).
# Skips the /var/www/ and /var/www/html mounts so the image code is not masked
# by the PVC. Only granular mounts (config, custom_apps, themes, tmp) are kept.
useImageCode: false
# if set, we'll template this list to the NEXTCLOUD_TRUSTED_DOMAINS env var
trustedDomains: []
## SMTP configuration
Expand Down