mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +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
|
@ -0,0 +1,23 @@
|
|||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import { EnvironmentId } from '@/portainer/environments/types';
|
||||
import {
|
||||
KubernetesApiListResponse,
|
||||
V1IngressClass,
|
||||
} from '@/react/kubernetes/services/kubernetes/types';
|
||||
|
||||
export async function getAllIngressClasses(environmentId: EnvironmentId) {
|
||||
try {
|
||||
const {
|
||||
data: { items },
|
||||
} = await axios.get<KubernetesApiListResponse<V1IngressClass[]>>(
|
||||
urlBuilder(environmentId)
|
||||
);
|
||||
return items;
|
||||
} catch (error) {
|
||||
throw parseAxiosError(error as Error);
|
||||
}
|
||||
}
|
||||
|
||||
function urlBuilder(environmentId: EnvironmentId) {
|
||||
return `endpoints/${environmentId}/kubernetes/apis/networking.k8s.io/v1/ingressclasses`;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue