import { KubernetesResource, LabelSelector, ObjectMeta, StringMap, Container, DaemonSetSpec, DaemonSetUpdateStrategy, DeploymentSpec, DeploymentStrategy, JobSpec, Probe, Service, StatefulSetSpec, StatefulSetUpdateStrategy, IngressRule, LocalObjectReference, PodAffinityTerm, PodSpecAffinity, WeightedPodAffinityTerm, IngressBackend } from '@alauda-fe/common'; import { ClusterNetworkType } from '@alauda-fe/network'; import { Workload, WorkloadKind, Workloads } from './backend-api'; export declare const LOG_PATH_KEY = "__FILE_LOG_PATH__"; export declare const EXCLUDE_LOG_PATH_KEY = "__EXCLUDE_LOG_PATH__"; export interface ContainerProbes { livenessProbe?: Probe; readinessProbe?: Probe; } export interface WorkloadOption { kind: WorkloadKind; name: string; } export interface ApplicationFormModel extends KubernetesResource { spec?: { selector?: LabelSelector; componentTemplates: T[]; }; } export interface PodControllerFormModel extends KubernetesResource { suffixName?: string; spec?: DeploymentSpec | StatefulSetSpec | DaemonSetSpec; } export interface PodTemplateSpecFormModel { network?: PodNetworkFormModel; metadata: ObjectMeta; spec: PodSpecFormModel; } export interface PodSpecFormModel { initContainers?: ContainerFormModel[]; containers?: ContainerFormModel[]; hostNetwork?: boolean; nodeSelector?: StringMap; affinity?: PodSpecAffinity; imagePullSecrets?: LocalObjectReference[]; terminationGracePeriodSeconds?: number; runtimeClassName?: string; } export interface PodNetworkFormModel { fixIp?: string[]; networkType?: ClusterNetworkType; subnet?: string; ingressRate?: number | string; egressRate?: number | string; } export interface ContainerFormModel extends Container { probes?: { livenessProbe?: Probe; readinessProbe?: Probe; }; logPaths?: string[]; excludeLogPaths?: string[]; } export interface PodAffinityFormModel { type: string; weight: number; topologyKey: string; labelSelector: LabelSelector; } export type AffinityTerm = WeightedPodAffinityTerm | PodAffinityTerm; export declare const PodAffinityType: { readonly required: "requiredDuringSchedulingIgnoredDuringExecution"; readonly preferred: "preferredDuringSchedulingIgnoredDuringExecution"; }; export interface ResourceRequirementsFormModel { limits?: { cpu?: { value: string; unit: string; }; memory?: { value: string; unit: string; }; }; requests?: { cpu?: { value: string; unit: string; }; memory?: { value: string; unit: string; }; }; customResource?: { limits: { [key: string]: string; }; requests: { [key: string]: string; }; }; } export type StrategyFormModel = DeploymentStrategy | DaemonSetUpdateStrategy | StatefulSetUpdateStrategy; export interface ServiceFormModel { service: Service; workload?: Workload; targetComponents?: 'workload' | 'virtualization' | 'label-selectors'; workloadType?: keyof Workloads; workloadName?: string; virtualizationType?: 'VirtualMachine' | 'VirtualMachinePool'; virtualizationName?: string; _selector?: StringMap; annotations?: StringMap; } export declare enum PodNetworkTypeEnum { host = "Host", cluster = "Cluster" } export interface IngressRuleFormModel extends IngressRule { protocol?: string; secretName?: string; domain?: string; subDomain?: string; } export interface IngressSpecFormModel { ingressClassName?: string; backend?: IngressBackend; rules?: IngressRuleFormModel[]; } export interface IngressFormModel extends KubernetesResource { spec?: IngressSpecFormModel; } export interface JobSpecFormModel extends JobSpec { jobType?: string; startingDeadlineSeconds?: number | ''; }