Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix subPath on datadir mounts (fixes #531) #538

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 5.2.2
version: 6.0.0
appVersion: 29.0.3
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
8 changes: 5 additions & 3 deletions charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,13 @@ Create volume mounts for the nextcloud container as well as the cron sidecar con
- name: nextcloud-main
mountPath: /var/www/html
subPath: {{ ternary "html" (printf "%s/html" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
{{- if .Values.persistence.nextcloudData.enabled }}
- name: nextcloud-data
mountPath: {{ .Values.nextcloud.datadir }}
subPath: {{ ternary "data" (printf "%s/data" .Values.persistence.nextcloudData.subPath) (empty .Values.persistence.nextcloudData.subPath) }}
{{- else }}
{{- if not (empty .Values.persistence.nextcloudData.subPath) }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use

{{- with .Values.wasd }}
a: {{ . }}
{{- end }}

Instatt of

{{- if not (empty .Values.wasd) }}
a: {{ .Values.wasd }}
{{- end }}

subPath: {{ .Values.persistence.nextcloudData.subPath }}
{{- end }}
Deaddy marked this conversation as resolved.
Show resolved Hide resolved
{{- else if .Values.persistence.enabled }}
- name: nextcloud-main
mountPath: {{ .Values.nextcloud.datadir }}
subPath: {{ ternary "data" (printf "%s/data" .Values.persistence.subPath) (empty .Values.persistence.subPath) }}
Expand Down
8 changes: 5 additions & 3 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ spec:
- name: nextcloud-main
mountPath: /var/www/html
subPath: {{ ternary "html" (printf "%s/html" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
{{- if .Values.persistence.nextcloudData.enabled }}
- name: nextcloud-data
mountPath: {{ .Values.nextcloud.datadir }}
subPath: {{ ternary "data" (printf "%s/data" .Values.persistence.nextcloudData.subPath) (empty .Values.persistence.nextcloudData.subPath) }}
{{- else }}
{{- if not (empty .Values.persistence.nextcloudData.subPath) }}
subPath: {{ .Values.persistence.nextcloudData.subPath }}
{{- end }}
{{- else if .Values.persistence.enabled }}
- name: nextcloud-main
mountPath: {{ .Values.nextcloud.datadir }}
subPath: {{ ternary "data" (printf "%s/data" .Values.persistence.subPath) (empty .Values.persistence.subPath) }}
Expand Down