Skip to content

Commit 1582a94

Browse files
committed
fix missing ns
1 parent d68dca0 commit 1582a94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/evergreen/e2e/e2e.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ dump_cluster_information() {
4848

4949
cleanup_operator() {
5050
local context="${1}"
51-
if ! timeout 5s helm uninstall --wait --kube-context="${context}" mongodb-kubernetes-operator; then
51+
local namespace="${2}"
52+
if ! timeout 5s helm uninstall --wait --kube-context="${context}" -n ${namespace} mongodb-kubernetes-operator; then
5253
echo "Warning: Helm uninstall failed or timed out. Continuing anyway."
5354
fi
5455
}
@@ -161,10 +162,10 @@ if [[ "${CLUSTER_TYPE}" == "openshift" ]]; then
161162
else
162163
if [[ "${KUBE_ENVIRONMENT_NAME}" == "multi" ]]; then
163164
echo "Tearing down operator on ${CENTRAL_CLUSTER}"
164-
cleanup_operator "${CENTRAL_CLUSTER}"
165+
cleanup_operator "${CENTRAL_CLUSTER}" "${NAMESPACE}"
165166
else
166167
# If the test passed, then the namespace is removed
167-
cleanup_operator "$(kubectl config current-context)"
168+
cleanup_operator "$(kubectl config current-context)" "${NAMESPACE}"
168169
fi
169170
fi
170171

0 commit comments

Comments
 (0)