diff --git a/app/kubernetes/horizontal-pod-auto-scaler/converter.js b/app/kubernetes/horizontal-pod-auto-scaler/converter.js index 12841b0bf..2647cdd79 100644 --- a/app/kubernetes/horizontal-pod-auto-scaler/converter.js +++ b/app/kubernetes/horizontal-pod-auto-scaler/converter.js @@ -50,7 +50,7 @@ export class KubernetesHorizontalPodAutoScalerConverter { res.Namespace = formValues.ResourcePool.Namespace.Name; res.MinReplicas = formValues.AutoScaler.minReplicas; res.MaxReplicas = formValues.AutoScaler.maxReplicas; - res.TargetCPUUtilization = formValues.AutoScaler.targetCpuUtilizationPercentage; + res.targetCpuUtilizationPercentage = formValues.AutoScaler.targetCpuUtilizationPercentage; res.TargetEntity.Name = formValues.Name; res.TargetEntity.Kind = kind; res.TargetEntity.ApiVersion = formValues.AutoScaler.apiVersion; diff --git a/app/kubernetes/horizontal-pod-auto-scaler/models.js b/app/kubernetes/horizontal-pod-auto-scaler/models.js index 1e4bf9122..05061830f 100644 --- a/app/kubernetes/horizontal-pod-auto-scaler/models.js +++ b/app/kubernetes/horizontal-pod-auto-scaler/models.js @@ -7,7 +7,7 @@ const _KubernetesHorizontalPodAutoScaler = Object.freeze({ Name: '', MinReplicas: 1, MaxReplicas: 1, - TargetCPUUtilization: 0, + targetCpuUtilizationPercentage: 0, TargetEntity: { ApiVersion: '', Kind: '', diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index 0baa7971e..9db29fb5d 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -283,6 +283,7 @@ class KubernetesCreateApplicationController { /* #region AUTO SCALER UI MANAGEMENT */ onAutoScaleChange(values) { return this.$async(async () => { + // when enabling the auto scaler, set the default values if (!this.formValues.AutoScaler.isUsed && values.isUsed) { this.formValues.AutoScaler = { isUsed: values.isUsed, @@ -292,6 +293,7 @@ class KubernetesCreateApplicationController { }; return; } + // otherwise, just update the values this.formValues.AutoScaler = values; }); }