mirror of https://github.com/portainer/portainer
Merge branch 'release/2.5' into develop
commit
6a88c2ae36
|
@ -141,8 +141,17 @@ class KubernetesConfigureController {
|
|||
}
|
||||
|
||||
async removeIngressesAcrossNamespaces() {
|
||||
const promises = [];
|
||||
const ingressesToDel = _.filter(this.formValues.IngressClasses, { NeedsDeletion: true });
|
||||
|
||||
if (!ingressesToDel.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const promises = [];
|
||||
const oldEndpointID = this.EndpointProvider.endpointID();
|
||||
this.EndpointProvider.setEndpointID(this.endpoint.Id);
|
||||
|
||||
try {
|
||||
const allResourcePools = await this.KubernetesResourcePoolService.get();
|
||||
const resourcePools = _.filter(
|
||||
allResourcePools,
|
||||
|
@ -155,6 +164,9 @@ class KubernetesConfigureController {
|
|||
promises.push(this.KubernetesIngressService.delete(resourcePool.Namespace.Name, ingress.Name));
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
this.EndpointProvider.setEndpointID(oldEndpointID);
|
||||
}
|
||||
|
||||
const responses = await Promise.allSettled(promises);
|
||||
responses.forEach((respons) => {
|
||||
|
|
Loading…
Reference in New Issue