You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/kubernetes/models/resource-quota/models.js

28 lines
1.0 KiB

import KubernetesResourceQuotaHelper from 'Kubernetes/helpers/resourceQuotaHelper';
export const KubernetesPortainerResourceQuotaPrefix = 'portainer-rq-';
export const KubernetesPortainerResourceQuotaCPULimit = 'limits.cpu';
export const KubernetesPortainerResourceQuotaMemoryLimit = 'limits.memory';
export const KubernetesPortainerResourceQuotaCPURequest = 'requests.cpu';
export const KubernetesPortainerResourceQuotaMemoryRequest = 'requests.memory';
export const KubernetesResourceQuotaDefaults = {
CpuLimit: 0,
MemoryLimit: 0,
};
export function KubernetesResourceQuota(namespace) {
return {
Id: '',
Namespace: namespace ? namespace : '',
Name: namespace ? KubernetesResourceQuotaHelper.generateResourceQuotaName(namespace) : '',
CpuLimit: KubernetesResourceQuotaDefaults.CpuLimit,
MemoryLimit: KubernetesResourceQuotaDefaults.MemoryLimit,
CpuLimitUsed: KubernetesResourceQuotaDefaults.CpuLimit,
MemoryLimitUsed: KubernetesResourceQuotaDefaults.MemoryLimit,
Yaml: '',
ResourcePoolName: '',
ResourcePoolOwner: '',
};
}