mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(k8s/application): add default values for auto scaler (#4190)
This commit is contained in:
parent
baaa96f34f
commit
a1e3ed7f78
3 changed files with 5 additions and 5 deletions
|
@ -264,7 +264,7 @@ class KubernetesApplicationHelper {
|
|||
return finalRes;
|
||||
}
|
||||
|
||||
static generateAutoScalerFormValueFromHorizontalPodAutoScaler(autoScaler) {
|
||||
static generateAutoScalerFormValueFromHorizontalPodAutoScaler(autoScaler, replicasCount) {
|
||||
const res = new KubernetesApplicationAutoScalerFormValue();
|
||||
if (autoScaler) {
|
||||
res.IsUsed = true;
|
||||
|
@ -274,6 +274,8 @@ class KubernetesApplicationHelper {
|
|||
res.ApiVersion = autoScaler.ApiVersion;
|
||||
} else {
|
||||
res.ApiVersion = 'apps/v1';
|
||||
res.MinReplicas = replicasCount;
|
||||
res.MaxReplicas = replicasCount;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue