mirror of https://github.com/portainer/portainer
fix(ingresses): load cluster wide ingresses [r8s-78] (#78)
parent
6c57a00a65
commit
94b1d446c0
|
@ -424,7 +424,7 @@ class KubernetesCreateApplicationController {
|
||||||
const ingressNamesLoaded = this.ingresses.map((i) => i.Name);
|
const ingressNamesLoaded = this.ingresses.map((i) => i.Name);
|
||||||
const areAllIngressesLoaded = uniqueIngressNamesUsed.every((ingressNameUsed) => ingressNamesLoaded.includes(ingressNameUsed));
|
const areAllIngressesLoaded = uniqueIngressNamesUsed.every((ingressNameUsed) => ingressNamesLoaded.includes(ingressNameUsed));
|
||||||
if (!areAllIngressesLoaded) {
|
if (!areAllIngressesLoaded) {
|
||||||
this.refreshIngresses();
|
this.refreshIngresses(this.application.ResourcePool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// update the services
|
// update the services
|
||||||
|
|
|
@ -53,7 +53,10 @@ export function AppIngressPathsForm({
|
||||||
const allowedIngresses =
|
const allowedIngresses =
|
||||||
ingresses?.filter((ing) => {
|
ingresses?.filter((ing) => {
|
||||||
const className = ing.ClassName || 'none';
|
const className = ing.ClassName || 'none';
|
||||||
return allowedIngressClasses.includes(className);
|
return (
|
||||||
|
allowedIngressClasses.includes(className) &&
|
||||||
|
ing.Namespace === namespace
|
||||||
|
);
|
||||||
}) || [];
|
}) || [];
|
||||||
return allowedIngresses.flatMap((ing) =>
|
return allowedIngresses.flatMap((ing) =>
|
||||||
ing.Hosts?.length
|
ing.Hosts?.length
|
||||||
|
@ -64,7 +67,7 @@ export function AppIngressPathsForm({
|
||||||
}))
|
}))
|
||||||
: []
|
: []
|
||||||
);
|
);
|
||||||
}, [ingressControllers, ingresses]);
|
}, [namespace, ingressControllers, ingresses]);
|
||||||
|
|
||||||
if (ingressesQuery.isError || ingressControllersQuery.isError) {
|
if (ingressesQuery.isError || ingressControllersQuery.isError) {
|
||||||
return <FormError>Unable to load ingresses.</FormError>;
|
return <FormError>Unable to load ingresses.</FormError>;
|
||||||
|
|
Loading…
Reference in New Issue