1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

refactor(app): migrate resource reservations [EE-6236] (#10695)

* refactor(app): migrate resource reservations [EE-6236]
This commit is contained in:
Ali 2024-01-03 10:03:33 +13:00 committed by GitHub
parent e07ee05ee7
commit 947ba4940b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 168 additions and 96 deletions

View file

@ -154,6 +154,7 @@ class KubernetesCreateApplicationController {
this.onConfigMapsChange = this.onConfigMapsChange.bind(this);
this.onSecretsChange = this.onSecretsChange.bind(this);
this.onChangePersistedFolder = this.onChangePersistedFolder.bind(this);
this.onChangeResourceReservation = this.onChangeResourceReservation.bind(this);
}
/* #endregion */
@ -539,6 +540,13 @@ class KubernetesCreateApplicationController {
}
}
onChangeResourceReservation(values) {
return this.$async(async () => {
this.formValues.MemoryLimit = values.memoryLimit;
this.formValues.CpuLimit = values.cpuLimit;
});
}
resourceQuotaCapacityExceeded() {
return !this.state.sliders.memory.max || !this.state.sliders.cpu.max;
}