diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 15c16f6d..89d46161 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 8.7.0 +version: 8.8.0 # renovate: image=docker.io/library/nextcloud appVersion: 32.0.3 description: A file sharing server that puts the control and security of your own data back into your hands. diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 2f3bb007..1e3413c1 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -397,22 +397,23 @@ The [Nextcloud](https://hub.docker.com/_/nextcloud/) image stores the nextcloud Persistent Volume Claims are used to keep the data across deployments. This is known to work with GKE, EKS, K3s, and minikube. Nextcloud will *not* delete the PVCs when uninstalling the helm chart. -| Parameter | Description | Default | -| ----------------------------------------- | ---------------------------------------------------- | --------------- | -| `persistence.enabled` | Enable persistence using PVC | `false` | -| `persistence.annotations` | PVC annotations | `{}` | -| `persistence.labels` | PVC labels | `{}` | -| `persistence.storageClass` | PVC Storage Class for nextcloud volume | `nil` | -| `persistence.existingClaim` | An Existing PVC name for nextcloud volume | `nil` | -| `persistence.accessMode` | PVC Access Mode for nextcloud volume | `ReadWriteOnce` | -| `persistence.size` | PVC Storage Request for nextcloud volume | `8Gi` | -| `persistence.nextcloudData.enabled` | Create a second PVC for the data folder in nextcloud | `false` | -| `persistence.nextcloudData.annotations` | see `persistence.annotations` | `{}` | -| `persistence.nextcloudData.labels` | see `persistence.labels` | `{}` | -| `persistence.nextcloudData.storageClass` | see `persistence.storageClass` | `nil` | -| `persistence.nextcloudData.existingClaim` | see `persistence.existingClaim` | `nil` | -| `persistence.nextcloudData.accessMode` | see `persistence.accessMode` | `ReadWriteOnce` | -| `persistence.nextcloudData.size` | see `persistence.size` | `8Gi` | +| Parameter | Description | Default | +|------------------------------------------|---------------------------------------------------------|-----------------| +| `persistence.enabled` | Enable persistence using PVC | `false` | +| `persistence.annotations` | PVC annotations | `{}` | +| `persistence.labels` | PVC labels | `{}` | +| `persistence.storageClass` | PVC Storage Class for nextcloud volume | `nil` | +| `persistence.existingClaim` | An Existing PVC name for nextcloud volume | `nil` | +| `persistence.accessMode` | PVC Access Mode for nextcloud volume | `ReadWriteOnce` | +| `persistence.size` | PVC Storage Request for nextcloud volume | `8Gi` | +| `persistence.nextcloudData.enabled` | Create a second PVC for the data folder in nextcloud | `false` | +| `persistence.nextcloudData.annotations` | see `persistence.annotations` | `{}` | +| `persistence.nextcloudData.labels` | see `persistence.labels` | `{}` | +| `persistence.nextcloudData.storageClass` | see `persistence.storageClass` | `nil` | +| `persistence.nextcloudData.existingClaim` | see `persistence.existingClaim` | `nil` | +| `persistence.nextcloudData.accessMode` | see `persistence.accessMode` | `ReadWriteOnce` | +| `persistence.nextcloudData.size` | see `persistence.size` | `8Gi` | +| `persistence.hostPath` | Path on the host where nextcloud data is stored | `nil` | ### Metrics Configurations diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index 2e03dd60..4886cb09 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -350,9 +350,15 @@ spec: {{- end }} volumes: - name: nextcloud-main - {{- if .Values.persistence.enabled }} + {{- if and .Values.persistence.enabled }} + {{- if .Values.persistence.hostPath }} + hostPath: + path: {{ .Values.persistence.hostPath }} + type: Directory + {{- else }} persistentVolumeClaim: claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud{{- end }} + {{- end }} {{- else }} emptyDir: {} {{- end }} diff --git a/charts/nextcloud/templates/nextcloud-data-pvc.yaml b/charts/nextcloud/templates/nextcloud-data-pvc.yaml index 38779155..83495d50 100644 --- a/charts/nextcloud/templates/nextcloud-data-pvc.yaml +++ b/charts/nextcloud/templates/nextcloud-data-pvc.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.persistence.hostPath }} {{- if and .Values.persistence.enabled .Values.persistence.nextcloudData.enabled (not .Values.persistence.nextcloudData.existingClaim) }} --- kind: PersistentVolumeClaim @@ -21,10 +22,7 @@ spec: requests: storage: {{ .Values.persistence.nextcloudData.size | quote }} {{- with .Values.persistence.nextcloudData.storageClass }} - {{- if (eq "-" .) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ . }}" - {{- end }} + storageClassName: {{ ternary "" . (eq "-" .) }} {{- end }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index dfde6ed8..7ecc222d 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -740,6 +740,9 @@ persistence: accessMode: ReadWriteOnce size: 8Gi + ## If defined, use a hostPath volume for nextcloud data rather than a dynamically defined PVC. + hostPath: + ## Use an additional pvc for the data directory rather than a subpath of the default PVC ## Useful to store data on a different storageClass (e.g. on slower disks) nextcloudData: