1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

fix(kubernetes): remove unique check from kubernetes stacks [EE-6170] (#10542)

This commit is contained in:
Prabhat Khera 2023-10-27 15:41:02 +13:00 committed by GitHub
parent 8ee718f808
commit 26036c05f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 164 additions and 52 deletions

View file

@ -61,13 +61,10 @@ class KubernetesApplicationsController {
if (isAppFormCreated) {
const promises = _.map(stack.Applications, (app) => this.KubernetesApplicationService.delete(app));
await Promise.all(promises);
} else {
const application = stack.Applications.find((x) => x.StackId !== null);
if (application && application.StackId) {
await this.StackService.remove({ Id: application.StackId }, false, this.endpoint.Id);
}
}
await this.StackService.removeKubernetesStacksByName(stack.Name, stack.ResourcePool, false, this.endpoint.Id);
this.Notifications.success('Stack successfully removed', stack.Name);
_.remove(this.state.stacks, { Name: stack.Name });
} catch (err) {