export function KubernetesResourcePoolFormValues(defaults) {
return {
Name: '',
MemoryLimit: defaults.MemoryLimit,
CpuLimit: defaults.CpuLimit,
HasQuota: false,
IngressClasses: [], // KubernetesResourcePoolIngressClassFormValue
Registries: [], // RegistryViewModel
EndpointId: 0,
};
}
/**
* @param {KubernetesIngressClass} ingressClass
*/
export function KubernetesResourcePoolIngressClassFormValue(ingressClass) {
Namespace: undefined, // will be filled inside ResourcePoolService.create
IngressClass: ingressClass,
RewriteTarget: false,
Annotations: [], // KubernetesResourcePoolIngressClassAnnotationFormValue
Hosts: [],
Selected: false,
WasSelected: false,
AdvancedConfig: false,
Paths: [], // will be filled to save IngressClass.Paths inside ingressClassesToFormValues() on RP EDIT
export function KubernetesResourcePoolIngressClassAnnotationFormValue() {
Key: '',
Value: '',
export function KubernetesResourcePoolIngressClassHostFormValue() {
Host: '',
PreviousHost: '',
NeedsDeletion: false,
IsNew: true,