
Pods were not being deleted when rbd-provisioner or cephfs-provisioner charts are disabled and then reapplied the app. We needed to add new value in helm.sh/hook annotation on deployment resource to delete pods when chart is disabled and then reapplied platform-integ-apps. Test Plan: PASS: Apply platform-integ-apps, disable rbd-provisioner chart, then reapply App and Check if chart related pods, FluxCD helmrelease and helm release are all removed. PASS: Apply platform-integ-apps, disable cephfs-provisioner chart, then reapply App and Check if chart related pods, FluxCD helmrelease and helm release are all removed. Closes-Bug: #2029496 Change-Id: Ie4353cab3cf93abf362dc1e55265d4eb6a9d017e Signed-off-by: Gustavo Ornaghi Antunes <gustavo.ornaghiantunes@windriver.com>
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
From fbb1dd8e7d2e35f59d47c5903ce638932fb20f55 Mon Sep 17 00:00:00 2001
|
|
From: Gustavo Ornaghi Antunes <gustavo.ornaghiantunes@windriver.com>
|
|
Date: Fri, 04 Aug 2023 10:20:51 -0300
|
|
Subject: [PATCH] ceph-csi-rbd: add annotations to provisioner-deployment.yaml
|
|
|
|
Signed-off-by: Hediberto Cavalcante da Silva <hediberto.cavalcantedasilva@windriver.com>
|
|
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
|
|
Signed-off-by: Gustavo Ornaghi Antunes <gustavo.ornaghiantunes@windriver.com>
|
|
---
|
|
charts/ceph-csi-rbd/templates/provisioner-deployment.yaml | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml
|
|
index 824377a..f31b5d6 100644
|
|
--- a/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml
|
|
+++ b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml
|
|
@@ -10,6 +10,9 @@ metadata:
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
|
|
+ annotations:
|
|
+ "helm.sh/hook": "post-upgrade, post-install, post-delete"
|
|
+ "helm.sh/hook-delete-policy": "before-hook-creation"
|
|
spec:
|
|
replicas: {{ .Values.provisioner.replicaCount }}
|
|
strategy:
|
|
--
|
|
2.25.1
|