mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(ingress): autodetect ingress controllers EE-673 (#7712)
This commit is contained in:
parent
c96551e410
commit
89eda13eb3
48 changed files with 1252 additions and 1047 deletions
|
@ -65,14 +65,12 @@ export function useIngresses(
|
|||
'ingress',
|
||||
],
|
||||
async () => {
|
||||
const ingresses: Ingress[] = [];
|
||||
for (let i = 0; i < namespaces.length; i += 1) {
|
||||
const ings = await getIngresses(environmentId, namespaces[i]);
|
||||
if (ings) {
|
||||
ingresses.push(...ings);
|
||||
}
|
||||
}
|
||||
return ingresses;
|
||||
const ingresses = await Promise.all(
|
||||
namespaces.map((namespace) => getIngresses(environmentId, namespace))
|
||||
);
|
||||
// flatten the array and remove empty ingresses
|
||||
const filteredIngresses = ingresses.flat().filter((ing) => ing);
|
||||
return filteredIngresses;
|
||||
},
|
||||
{
|
||||
enabled: namespaces.length > 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue