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
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: 9.3.0
version: 9.3.1
# renovate: image=docker.io/library/nextcloud
appVersion: 34.0.4
description: A file sharing server that puts the control and security of your own data back into your hands.
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ The following table lists the configurable parameters of the nextcloud chart and
| `nextcloud.defaultConfigs.smtp\.config\.php` | Default configuration for smtp | `true` |
| `nextcloud.defaultConfigs.swift\.config\.php` | Default configuration for Swift as primary Object Storage | `true` |
| `nextcloud.defaultConfigs.upgrade-disable-web\.config\.php` | Default config to disable the web-based updater as the default docker image does not suppor it | `true` |
| `nextcloud.defaultConfigs.helm-metrics\.config\.php` | Applies `nextcloud.openmetrics.allowedClients` to `openmetrics_allowed_clients` | `true` |
| `nextcloud.defaultConfigs.imaginary\.config\.php` | Preview configuration for the bundled Imaginary service | `false` |
| `nextcloud.strategy` | specifies the strategy used to replace old Pods by new ones | `type: Recreate` |
| `nextcloud.extraEnv` | specify additional environment variables | `{}` |
| `nextcloud.extraSidecarContainers` | specify additional sidecar containers | `[]` |
Expand Down
15 changes: 13 additions & 2 deletions charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,19 @@ Swift as primary object store env vars
{{- end -}}


{{/*
Whether the config ConfigMap is rendered and mounted: true when nextcloud.configs
holds any file or any nextcloud.defaultConfigs entry is enabled.
Returns the string "true" or "false"; compare with (eq ... "true").
*/}}
{{- define "nextcloud.configs.enabled" -}}
{{- $enabled := not (empty .Values.nextcloud.configs) -}}
{{- range $_, $on := .Values.nextcloud.defaultConfigs -}}
{{- if $on }}{{ $enabled = true }}{{ end -}}
{{- end -}}
{{- $enabled -}}
{{- end -}}

{{/*
Create volume mounts for the nextcloud container as well as the cron sidecar container.
*/}}
Expand Down Expand Up @@ -428,15 +441,13 @@ Create volume mounts for the nextcloud container as well as the cron sidecar con
mountPath: /var/www/html/config/{{ $key }}
subPath: {{ $key }}
{{- end }}
{{- if .Values.nextcloud.configs }}
{{- range $key, $value := .Values.nextcloud.defaultConfigs }}
{{- if $value }}
- name: nextcloud-config
mountPath: /var/www/html/config/{{ $key }}
subPath: {{ $key }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.nextcloud.extraVolumeMounts }}
{{ toYaml .Values.nextcloud.extraVolumeMounts }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/nextcloud/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.nextcloud.configs -}}
{{- if eq (include "nextcloud.configs.enabled" .) "true" -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -16,4 +16,4 @@ data:
{{- tpl ($.Files.Get (printf "files/defaultConfigs/%s.tpl" $filename)) $ | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}{{/* end-if configs */}}
{{- end }}{{/* end-if configs.enabled */}}
2 changes: 1 addition & 1 deletion charts/nextcloud/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spec:
persistentVolumeClaim:
claimName: {{ if .Values.persistence.nextcloudData.existingClaim }}{{ .Values.persistence.nextcloudData.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud-data{{- end }}
{{- end }}
{{- if .Values.nextcloud.configs }}
{{- if eq (include "nextcloud.configs.enabled" .) "true" }}
- name: nextcloud-config
configMap:
name: {{ template "nextcloud.fullname" . }}-config
Expand Down
2 changes: 1 addition & 1 deletion charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ spec:
claimName: {{ with .Values.persistence.nextcloudData.existingClaim }}{{ . }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud-data{{- end }}
{{- end }}
{{- end }}
{{- if .Values.nextcloud.configs }}
{{- if eq (include "nextcloud.configs.enabled" .) "true" }}
- name: nextcloud-config
configMap:
name: {{ template "nextcloud.fullname" . }}-config
Expand Down
5 changes: 3 additions & 2 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ nextcloud:
phpConfigs: {}
## Default config files that utilize environment variables:
# see: https://github.com/nextcloud/docker/tree/master#auto-configuration-via-environment-variables
# IMPORTANT: Will be used only if you put extra configs, otherwise default will come from nextcloud itself
# Default confgurations can be found here: https://github.com/nextcloud/docker/tree/master/.config
# Every enabled file is mounted into /var/www/html/config. Most mirror the files shipped in the
# nextcloud image; helm-metrics.config.php and imaginary.config.php exist only in this chart.
# Default configurations of the image can be found here: https://github.com/nextcloud/docker/tree/master/.config
defaultConfigs:
# To protect /var/www/html/config
.htaccess: true
Expand Down