Skip to content

Commit

Permalink
feat: keep PVCs when uninstalling helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolas Rimikis <[email protected]>
  • Loading branch information
Leptopoda committed Apr 11, 2024
1 parent 7a9687f commit f168fad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
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: 4.6.5
version: 4.6.6
appVersion: 28.0.4
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
1 change: 1 addition & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ Is there a missing parameter for one of the Bitnami helm charts listed above? Pl

The [Nextcloud](https://hub.docker.com/_/nextcloud/) image stores the nextcloud data and configurations at the `/var/www/html` paths of the container.
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 |
Expand Down
7 changes: 4 additions & 3 deletions charts/nextcloud/templates/nextcloud-data-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/component: app
{{- with .Values.persistence.nextcloudData.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
helm.sh/resource-policy: keep
{{- with .Values.persistence.nextcloudData.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.nextcloudData.accessMode | quote }}
Expand Down
7 changes: 4 additions & 3 deletions charts/nextcloud/templates/nextcloud-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/component: app
{{- with .Values.persistence.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
helm.sh/resource-policy: keep
{{- with .Values.persistence.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
Expand Down

0 comments on commit f168fad

Please sign in to comment.