If the current resource exceeds that value it is set as the max-value, so that it doesn't get capped down, (since it is already allowed).
~Left Todo~
[x] handle multiple replicas
[x] change on changes to values before submitting
How it looks
Editing a deployment with 1 replica
1.8 cores left to use across one deployment => 1.8 cores max per replica
Editing a deployment with 2 replicas
1.8 cores left to use across two deployment => 0.8 cores max per replica rounded down to step for the resource type, which is 0.2 for deployments and 1 for vms.Editing a disabled deployments specs
Set resource limits based on
quota - usage
Previously the max values for the specs were hardcoded, causing #329. The issue was caused by this:
So i changed it so that the max cpu cores and ram are set based on:
If the current resource exceeds that value it is set as the max-value, so that it doesn't get capped down, (since it is already allowed).
~Left Todo~
How it looks
Editing a deployment with 1 replica 1.8 cores left to use across one deployment => 1.8 cores max per replica Editing a deployment with 2 replicas 1.8 cores left to use across two deployment => 0.8 cores max per replica rounded down to step for the resource type, which is 0.2 for deployments and 1 for vms. Editing a disabled deployments specs
closes #329