7e768a54d5
* feat(k8s/resource-pool): add storage quota create/edit * feat(kubernetes): persistent volume claim size validation on app create/edit * feat(k8s/volume): quota validation on volume expansion * fix(k8s/application): remove resource limitation message when then is no resource limitation but volume quota * style(k8s/application): remove HTML layout debug string * feat(k8s/resource-pool): remove warning message on storage quota reduction * fix(k8s/application): available size on storage quota is now properly computed on init * fix(k8s/application): 'flagged for removal' bindings are not considered free space anymore * feat(k8s/application): allow users to use existing available volumes when quotas are exhausted * feat(k8s/resource-pool): storage quota usage bar in edit view * fix(k8s/resource-pool): create RP enable quota by default * refactor(k8s): move all volume related units to base 10 instead of base 2 (remive i suffix) * fix(k8s/application): visual issues caused by latency in computation * feat(k8s/resource-pool): allow standard users to see storage quota usage * feat(k8s/volume): show max available size on volume expand * style(k8s/application): exhausted storage quota message * fix(k8s/application): remove persisted folders entries when selecting RP with all exhausted storage quotas and no available volumes * style(k8s/application): file format after rebase * fix(k8s/application): evaluate quota onInit for app edit * chore(grunt): add prod watch grunt rule and config * fix(k8s/application): display 'no storages' message on all restricted quotas * refactor(k8s/volumes): unify volume parsing * refactor(app): proper prod watch + enforce parseInt radix
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
export function KubernetesResourcePoolFormValues(defaults) {
|
|
return {
|
|
Name: '',
|
|
MemoryLimit: defaults.MemoryLimit,
|
|
CpuLimit: defaults.CpuLimit,
|
|
LoadBalancers: defaults.LoadBalancers,
|
|
UseLoadBalancersQuota: false,
|
|
HasQuota: false,
|
|
IngressClasses: [], // KubernetesResourcePoolIngressClassFormValue
|
|
StorageClasses: [], // KubernetesResourcePoolStorageClassFormValue
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @param {KubernetesIngressClass} ingressClass
|
|
*/
|
|
export function KubernetesResourcePoolIngressClassFormValue(ingressClass) {
|
|
return {
|
|
Namespace: undefined, // will be filled inside ResourcePoolService.create
|
|
IngressClass: ingressClass,
|
|
RewriteTarget: false,
|
|
Annotations: [], // KubernetesResourcePoolIngressClassAnnotationFormValue
|
|
Host: undefined,
|
|
Selected: false,
|
|
WasSelected: false,
|
|
AdvancedConfig: false,
|
|
Paths: [], // will be filled to save IngressClass.Paths inside ingressClassesToFormValues() on RP EDIT
|
|
};
|
|
}
|
|
|
|
export function KubernetesResourcePoolIngressClassAnnotationFormValue() {
|
|
return {
|
|
Key: '',
|
|
Value: '',
|
|
};
|
|
}
|
|
|
|
export function KubernetesResourcePoolStorageClassFormValue(name) {
|
|
return {
|
|
Name: name,
|
|
Size: 0,
|
|
SizeUnit: 'GB',
|
|
Selected: false,
|
|
};
|
|
}
|