ci: internally create & delete cephcsi namespace in install-helm.sh

This ensures the kubectl call is retried with kubectl_retry function.

Updates: #2309

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 7fba62dd47)
This commit is contained in:
Rakshith R 2021-08-09 11:53:40 +05:30 committed by mergify[bot]
parent c9eb7bce7c
commit 1948dce69b

View File

@ -133,6 +133,8 @@ install_cephcsi_helm_charts() {
NAMESPACE="default" NAMESPACE="default"
fi fi
kubectl_retry create namespace ${NAMESPACE}
# label the nodes uniformly for domain information # label the nodes uniformly for domain information
for node in $(kubectl_retry get node -o jsonpath='{.items[*].metadata.name}'); do for node in $(kubectl_retry get node -o jsonpath='{.items[*].metadata.name}'); do
kubectl_retry label node/"${node}" ${NODE_LABEL_REGION}=${REGION_VALUE} kubectl_retry label node/"${node}" ${NODE_LABEL_REGION}=${REGION_VALUE}
@ -167,6 +169,7 @@ cleanup_cephcsi_helm_charts() {
fi fi
"${HELM}" uninstall ${CEPHFS_CHART_NAME} --namespace ${NAMESPACE} "${HELM}" uninstall ${CEPHFS_CHART_NAME} --namespace ${NAMESPACE}
"${HELM}" uninstall ${RBD_CHART_NAME} --namespace ${NAMESPACE} "${HELM}" uninstall ${RBD_CHART_NAME} --namespace ${NAMESPACE}
kubectl_retry delete namespace ${NAMESPACE}
} }
helm_reset() { helm_reset() {