fix(apps): for helm uninstall, ignore manual associated resource deletion [r8s-124] (#103)

release/2.24
Ali 2 weeks ago committed by GitHub
parent ad19b4a421
commit 1ead121c9b

@ -115,13 +115,19 @@ async function deleteApplications(
); );
// update associated k8s ressources // update associated k8s ressources
const servicesToDelete = getServicesFromApplications(applications); // helm uninstall will update associated k8s ressources for helm apps, so don't manually delete Helm app associated k8s resources
const nonHelmApplications = applications.filter(
(app) => app.ApplicationType !== 'Helm'
);
const servicesToDelete = getServicesFromApplications(nonHelmApplications);
// axios error handling is done inside deleteServices already // axios error handling is done inside deleteServices already
await deleteServices({ if (Object.keys(servicesToDelete).length > 0) {
environmentId, await deleteServices({
data: servicesToDelete, environmentId,
}); data: servicesToDelete,
const hpasToDelete = applications });
}
const hpasToDelete = nonHelmApplications
.map((app) => app.HorizontalPodAutoscaler) .map((app) => app.HorizontalPodAutoscaler)
.filter((hpa) => !!hpa); .filter((hpa) => !!hpa);
const settledHpaDeletions = await getAllSettledItems(hpasToDelete, (hpa) => const settledHpaDeletions = await getAllSettledItems(hpasToDelete, (hpa) =>

Loading…
Cancel
Save