1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

fix(ingresses): load cluster wide ingresses [r8s-78] (#78)

This commit is contained in:
Steven Kang 2024-10-31 13:08:09 +13:00 committed by GitHub
parent 6c57a00a65
commit 94b1d446c0
2 changed files with 6 additions and 3 deletions

View file

@ -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 <FormError>Unable to load ingresses.</FormError>;