Skip to content
Merged
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: 8.8.2
version: 8.9.0
# renovate: image=docker.io/library/nextcloud
appVersion: 32.0.5
description: A file sharing server that puts the control and security of your own data back into your hands.
Expand Down
34 changes: 18 additions & 16 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,22 +397,24 @@ 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.hostPath` | Path on the host where nextcloud data is stored | `nil` |
| `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.hostPath` | Path on the host where nextcloud data is stored | `nil` |
| `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` |

### Metrics Configurations

Expand Down
16 changes: 14 additions & 2 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,27 @@ spec:
volumes:
- name: nextcloud-main
{{- if .Values.persistence.enabled }}
{{- with .Values.persistence.hostPath }}
hostPath:
path: {{ . }}
type: Directory
{{- else }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud{{- end }}
claimName: {{ with .Values.persistence.existingClaim }}{{ . }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud{{- end }}
{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
- name: nextcloud-data
{{- with .Values.persistence.nextcloudData.hostPath }}
hostPath:
path: {{ . }}
type: Directory
{{- else }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.nextcloudData.existingClaim }}{{ .Values.persistence.nextcloudData.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud-data{{- end }}
claimName: {{ with .Values.persistence.nextcloudData.existingClaim }}{{ . }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud-data{{- end }}
{{- end }}
{{- end }}
{{- if .Values.nextcloud.configs }}
- name: nextcloud-config
Expand Down
13 changes: 7 additions & 6 deletions charts/nextcloud/templates/nextcloud-data-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{{- if and .Values.persistence.enabled .Values.persistence.nextcloudData.enabled (not .Values.persistence.nextcloudData.existingClaim) }}
{{- if and
.Values.persistence.enabled
.Values.persistence.nextcloudData.enabled
(not .Values.persistence.nextcloudData.hostPath)
(not .Values.persistence.nextcloudData.existingClaim)
}}
---
kind: PersistentVolumeClaim
apiVersion: v1
Expand All @@ -21,10 +26,6 @@ spec:
requests:
storage: {{ .Values.persistence.nextcloudData.size | quote }}
{{- with .Values.persistence.nextcloudData.storageClass }}
{{- if (eq "-" .) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ . }}"
{{- end }}
storageClassName: {{ ternary "" . (eq "-" .) }}
{{- end }}
{{- end }}
6 changes: 5 additions & 1 deletion charts/nextcloud/templates/nextcloud-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
{{- if and
.Values.persistence.enabled
(not .Values.persistence.hostPath)
(not .Values.persistence.existingClaim)
}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Expand Down
5 changes: 5 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,15 @@ 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:
enabled: false
# -- If defined, use a hostPath volume for nextcloud data rather than a dynamically defined PVC.
hostPath:
subPath:
labels: {}
annotations: {}
Expand Down
Loading