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

fix(app): don't attach all ingresses to app [EE-5686] (#10537)

This commit is contained in:
Ali 2023-10-27 04:59:45 +01:00 committed by GitHub
parent 26036c05f2
commit 47fa1626c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -125,7 +125,6 @@ class KubernetesApplicationService {
const boundScaler = KubernetesHorizontalPodAutoScalerHelper.findApplicationBoundScaler(autoScalers.value, application);
const scaler = boundScaler ? await this.KubernetesHorizontalPodAutoScalerService.get(namespace, boundScaler.Name) : undefined;
application.AutoScaler = scaler;
application.Ingresses = ingresses;
if (service.Yaml) {
application.Yaml += '---\n' + service.Yaml;
@ -183,7 +182,6 @@ class KubernetesApplicationService {
const boundScaler = KubernetesHorizontalPodAutoScalerHelper.findApplicationBoundScaler(autoScalers, application);
const scaler = boundScaler ? await this.KubernetesHorizontalPodAutoScalerService.get(ns, boundScaler.Name) : undefined;
application.AutoScaler = scaler;
application.Ingresses = await this.KubernetesIngressService.get(ns);
})
);
return applications;
@ -451,7 +449,8 @@ class KubernetesApplicationService {
if (application.ServiceType) {
// delete headless service && non-headless service
await this.KubernetesServiceService.delete(application.Services);
if (application.Ingresses.length) {
const appHasIngressPath = application.PublishedPorts && application.PublishedPorts.flatMap((pp) => pp.IngressRules).length >= 1;
if (appHasIngressPath) {
const originalIngresses = await this.KubernetesIngressService.get(payload.Namespace);
const formValues = {
OriginalIngresses: originalIngresses,