From 857fedecc6da4d0ffe62082fbbb27fb815b169bb Mon Sep 17 00:00:00 2001 From: Tae Park Date: Mon, 18 Dec 2023 16:34:33 -0500 Subject: [PATCH] Issue a Warning for Vault-Manager PVC Storage This commit adds an additional check for PVC storage for vault-manager after PVC-to-k8s conversion. If the storage is found then it will log a warning during start-up of vault manager. Test Plan: PASS bashate PASS AIO-SX vault sanity PASS New code issues logs only when the PVC storage persists after conversion Story: 2010930 Task: 49293 Change-Id: I2d669b06927b9d396ce5d6e582983ab78a3cc5fc Signed-off-by: Tae Park --- vault-helm/vault-helm/helm-charts/vault-init.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vault-helm/vault-helm/helm-charts/vault-init.yaml b/vault-helm/vault-helm/helm-charts/vault-init.yaml index 387c4b6..ec83f19 100644 --- a/vault-helm/vault-helm/helm-charts/vault-init.yaml +++ b/vault-helm/vault-helm/helm-charts/vault-init.yaml @@ -3220,6 +3220,13 @@ data: runConversion exit_on_trap 19 + # check if PVC still persisted after conversion, and if so issue a warning. + PVC_PREEXISTS="$( pvcExists )" + PVC_STATUS=$? + if [ $PVC_STATUS -eq 0 ]; then + log $WARNING "PVC storage $PVC_PREEXISTS deletion has failed during conversion" + fi + # Waiting for at least one vault server, to check initialization waitForPods 1 exit_on_trap 2