From 33b428eb7fcbddd09b6c19dfeab8d4c5ddd55f5a Mon Sep 17 00:00:00 2001 From: cong meng Date: Fri, 9 Jul 2021 10:39:14 +1200 Subject: [PATCH] EE-1110 Ingress routes and their mapping to a application name are not deleted when the application is deleted (#5291) Co-authored-by: Simon Meng --- app/kubernetes/helpers/application/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/kubernetes/helpers/application/index.js b/app/kubernetes/helpers/application/index.js index 82aa97c4e..657e63afd 100644 --- a/app/kubernetes/helpers/application/index.js +++ b/app/kubernetes/helpers/application/index.js @@ -282,7 +282,7 @@ class KubernetesApplicationHelper { res.IngressName = rule.IngressName; res.IngressRoute = rule.Path; res.IngressHost = rule.Host; - res.IngressHosts = ingress.find((i) => i.Name === rule.IngressName).Hosts; + res.IngressHosts = ingress && ingress.find((i) => i.Name === rule.IngressName).Hosts; } res.Protocol = port.Protocol; res.ContainerPort = port.TargetPort;