Skip to content

Commit 0c5f9c5

Browse files
authored
Merge pull request #66580 from mburke5678/cma-add-minReplicaCount
OCPBUGS18775: Setting up Custom Metrics Autoscaler following the CPU trigger documentation
2 parents 6316108 + f8aa3cb commit 0c5f9c5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/nodes-cma-autoscaling-custom-trigger-cpu.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ spec:
3131
metricType: Utilization <2>
3232
metadata:
3333
value: '60' <3>
34-
containerName: api <4>
35-
34+
minReplicaCount: 1 <4>
3635
----
3736
<1> Specifies CPU as the trigger type.
3837
<2> Specifies the type of metric to use, either `Utilization` or `AverageValue`.
3938
<3> Specifies the value that triggers scaling. Must be specified as a quoted string value.
4039
* When using `Utilization`, the target value is the average of the resource metrics across all relevant pods, represented as a percentage of the requested value of the resource for the pods.
4140
* When using `AverageValue`, the target value is the average of the metrics across all relevant pods.
42-
<4> Optional: Specifies an individual container to scale, based on the memory utilization of only that container, rather than the entire pod. In this example, only the container named `api` is to be scaled.
41+
<4> Specifies the minimum number of replicas when scaling down. For a CPU trigger, enter a value of `1` or greater, because the HPA cannot scale to zero if you are using only CPU metrics.

0 commit comments

Comments
 (0)