|
|
|
@ -2,6 +2,11 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
|
|
import { FormikErrors } from 'formik';
|
|
|
|
|
|
|
|
|
|
import { KubernetesApplicationPublishingTypes } from '@/kubernetes/models/application/models';
|
|
|
|
|
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
|
|
|
|
import {
|
|
|
|
|
useIngressControllers,
|
|
|
|
|
useIngresses,
|
|
|
|
|
} from '@/react/kubernetes/ingresses/queries';
|
|
|
|
|
|
|
|
|
|
import { FormSection } from '@@/form-components/FormSection';
|
|
|
|
|
|
|
|
|
@ -50,6 +55,11 @@ export function KubeServicesForm({
|
|
|
|
|
const [selectedServiceType, setSelectedServiceType] =
|
|
|
|
|
useState<ServiceTypeValue>('ClusterIP');
|
|
|
|
|
|
|
|
|
|
// start loading ingresses and controllers early to reduce perceived loading time
|
|
|
|
|
const environmentId = useEnvironmentId();
|
|
|
|
|
useIngresses(environmentId, namespace ? [namespace] : []);
|
|
|
|
|
useIngressControllers(environmentId, namespace);
|
|
|
|
|
|
|
|
|
|
// when the appName changes, update the names for each service
|
|
|
|
|
// and the serviceNames for each service port
|
|
|
|
|
const newServiceNames = useMemo(
|
|
|
|
|