mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(app): get utilization percentage in payload [EE-6387] (#10962)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
95474b7dc5
commit
752be47fcc
3 changed files with 4 additions and 2 deletions
|
@ -50,7 +50,7 @@ export class KubernetesHorizontalPodAutoScalerConverter {
|
||||||
res.Namespace = formValues.ResourcePool.Namespace.Name;
|
res.Namespace = formValues.ResourcePool.Namespace.Name;
|
||||||
res.MinReplicas = formValues.AutoScaler.minReplicas;
|
res.MinReplicas = formValues.AutoScaler.minReplicas;
|
||||||
res.MaxReplicas = formValues.AutoScaler.maxReplicas;
|
res.MaxReplicas = formValues.AutoScaler.maxReplicas;
|
||||||
res.TargetCPUUtilization = formValues.AutoScaler.targetCpuUtilizationPercentage;
|
res.targetCpuUtilizationPercentage = formValues.AutoScaler.targetCpuUtilizationPercentage;
|
||||||
res.TargetEntity.Name = formValues.Name;
|
res.TargetEntity.Name = formValues.Name;
|
||||||
res.TargetEntity.Kind = kind;
|
res.TargetEntity.Kind = kind;
|
||||||
res.TargetEntity.ApiVersion = formValues.AutoScaler.apiVersion;
|
res.TargetEntity.ApiVersion = formValues.AutoScaler.apiVersion;
|
||||||
|
|
|
@ -7,7 +7,7 @@ const _KubernetesHorizontalPodAutoScaler = Object.freeze({
|
||||||
Name: '',
|
Name: '',
|
||||||
MinReplicas: 1,
|
MinReplicas: 1,
|
||||||
MaxReplicas: 1,
|
MaxReplicas: 1,
|
||||||
TargetCPUUtilization: 0,
|
targetCpuUtilizationPercentage: 0,
|
||||||
TargetEntity: {
|
TargetEntity: {
|
||||||
ApiVersion: '',
|
ApiVersion: '',
|
||||||
Kind: '',
|
Kind: '',
|
||||||
|
|
|
@ -283,6 +283,7 @@ class KubernetesCreateApplicationController {
|
||||||
/* #region AUTO SCALER UI MANAGEMENT */
|
/* #region AUTO SCALER UI MANAGEMENT */
|
||||||
onAutoScaleChange(values) {
|
onAutoScaleChange(values) {
|
||||||
return this.$async(async () => {
|
return this.$async(async () => {
|
||||||
|
// when enabling the auto scaler, set the default values
|
||||||
if (!this.formValues.AutoScaler.isUsed && values.isUsed) {
|
if (!this.formValues.AutoScaler.isUsed && values.isUsed) {
|
||||||
this.formValues.AutoScaler = {
|
this.formValues.AutoScaler = {
|
||||||
isUsed: values.isUsed,
|
isUsed: values.isUsed,
|
||||||
|
@ -292,6 +293,7 @@ class KubernetesCreateApplicationController {
|
||||||
};
|
};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// otherwise, just update the values
|
||||||
this.formValues.AutoScaler = values;
|
this.formValues.AutoScaler = values;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue