ci: Uninstall Helm releases individually
What does this MR do and why?
To uninstall a Helm release, we need to pass the --namespace
argument. Historically, we used to install Helm releases in the review-apps
namespace but we now install releases in their own namespace, so the global helm uninstall release1 release2
command doesn't work anymore.
I noticed this in https://gitlab.com/gitlab-org/gitlab/-/jobs/3676998385:
The `helm uninstall review-mg-track-n-ydo2x2 review-384074-sel-e40rte review-rossetd-mi-ekzz9h review-djadmin-fi-c40rn8 review-384280-mig-sq69eu review-poc-create-q4e5n8 review-386754-js-y0kepf review-dmishunov-1dxp57 review-snippet-fi-1neiju review-384267-mig-3z8sir review-381738-fil-6sum02 review-374020-rem-l183iw review-385456-hid-v0kas1 review-vs-add-esb-9krj96 review-himkp-mark-sgc0vt review-345072-ce-acgt91 review-378854-mak-os9ype review-351705-rtl-cw46uk review-382224-fix-7jr6sx review-himkp-pres-zdpo0n review-sv-promote-zngd3c review-334309-add-wbs7q4 review-dc-wi-thre-w7ltn8 review-383131-ale-cae8hu review-382493-ext-femqs6 review-ci-include-hdx23z review-384291-mig-n2kapj review-388943-fix-3ea2wr review-369012-hid-274yz9 review-333581-gra-t9zm2o review-add-alerte-uu1s4w review-383160-ser-fenfxy review-qa-slack-i-lnpu6y review-ah-remove-wauamy` command failed (status: pid 86 exit 1) with the following error:
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /builds/gitlab-org/gitlab.tmp/KUBECONFIG
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /builds/gitlab-org/gitlab.tmp/KUBECONFIG
Error: uninstall: Release not loaded: review-mg-track-n-ydo2x2: release: not found
Example job: https://gitlab.com/gitlab-org/gitlab/-/jobs/3683559529
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Rémy Coutable