
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>
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
From e0afca6467c6986ca8f6f1facbc6859a3c42ecf5 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-cephfs: 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-cephfs/templates/provisioner-deployment.yaml | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml
|
|
index dcc15ee..2d7c815 100644
|
|
--- a/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml
|
|
+++ b/charts/ceph-csi-cephfs/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:
|
|
@@ -98,7 +101,7 @@ spec:
|
|
- "--v={{ .Values.sidecarLogLevel }}"
|
|
- "--timeout={{ .Values.provisioner.timeout }}"
|
|
- "--leader-election=true"
|
|
- - "--extra-create-metadata=true"
|
|
+ - "--extra-create-metadata=false"
|
|
{{- range .Values.provisioner.snapshotter.extraArgs }}
|
|
- "--{{ . }}"
|
|
{{- end }}
|
|
--
|
|
2.25.1
|