|
|
@ -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) =>
|
|
|
|