From d5e757cf50f10ab7a0f39158b1f06d03be62da3a Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Wed, 10 Apr 2024 20:55:50 +0200 Subject: [PATCH] feat: keep PVCs when uninstalling helm chart Signed-off-by: Nikolas Rimikis --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 1 + charts/nextcloud/templates/nextcloud-data-pvc.yaml | 3 ++- charts/nextcloud/templates/nextcloud-pvc.yaml | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 8ae04020..876c6238 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -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: diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 9d87425a..6581b09c 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -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 | diff --git a/charts/nextcloud/templates/nextcloud-data-pvc.yaml b/charts/nextcloud/templates/nextcloud-data-pvc.yaml index d10900a8..3a66404a 100644 --- a/charts/nextcloud/templates/nextcloud-data-pvc.yaml +++ b/charts/nextcloud/templates/nextcloud-data-pvc.yaml @@ -10,8 +10,9 @@ 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: + helm.sh/resource-policy: keep + {{- with .Values.persistence.nextcloudData.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: diff --git a/charts/nextcloud/templates/nextcloud-pvc.yaml b/charts/nextcloud/templates/nextcloud-pvc.yaml index 6bdd620b..893c952f 100644 --- a/charts/nextcloud/templates/nextcloud-pvc.yaml +++ b/charts/nextcloud/templates/nextcloud-pvc.yaml @@ -9,8 +9,9 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/component: app - {{- with .Values.persistence.annotations }} annotations: + helm.sh/resource-policy: keep + {{- with .Values.persistence.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: