diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index 8c2841dc6..ac8aea483 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -424,7 +424,7 @@ class KubernetesCreateApplicationController { const ingressNamesLoaded = this.ingresses.map((i) => i.Name); const areAllIngressesLoaded = uniqueIngressNamesUsed.every((ingressNameUsed) => ingressNamesLoaded.includes(ingressNameUsed)); if (!areAllIngressesLoaded) { - this.refreshIngresses(); + this.refreshIngresses(this.application.ResourcePool); } } // update the services diff --git a/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathsForm.tsx b/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathsForm.tsx index 7d632fe64..8affd58aa 100644 --- a/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathsForm.tsx +++ b/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathsForm.tsx @@ -53,7 +53,10 @@ export function AppIngressPathsForm({ const allowedIngresses = ingresses?.filter((ing) => { const className = ing.ClassName || 'none'; - return allowedIngressClasses.includes(className); + return ( + allowedIngressClasses.includes(className) && + ing.Namespace === namespace + ); }) || []; return allowedIngresses.flatMap((ing) => ing.Hosts?.length @@ -64,7 +67,7 @@ export function AppIngressPathsForm({ })) : [] ); - }, [ingressControllers, ingresses]); + }, [namespace, ingressControllers, ingresses]); if (ingressesQuery.isError || ingressControllersQuery.isError) { return Unable to load ingresses.;