Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation for cpu/memory activation feature #1470

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/docs/2.16/scalers/cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ triggers:
- `value` - Value to trigger scaling actions for:
- When using `Utilization`, the target value is the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.
- When using `AverageValue`, the target value is the target value of the average of the metric across all relevant pods (quantity).
- `activationValue` - Target value for activating the scaler. Learn more about activation [here](https://keda.sh/docs/2.15/concepts/scaling-deployments/#activating-and-scaling-thresholds). (Default: 0, Optional)
- When using `Utilization`, the target value is `Utilization`
- When using `AverageValue`, the target value is `AverageValue`
- `containerName` - Name of the specific container to scale based on its CPU, rather than the entire pod. Defaults to empty if not specified.

> 💡 **NOTE:** `containerName` parameter requires Kubernetes cluster version 1.20 or higher with `HPAContainerMetrics` feature enabled. Please see [container resource metrics](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#container-resource-metrics) for more information.
Expand All @@ -75,6 +78,7 @@ spec:
metricType: Utilization # Allowed types are 'Utilization' or 'AverageValue'
metadata:
value: "50"
activationValue: "30"
```

The following example targets CPU utilization of a specific container (`foo`) in a pod.
Expand All @@ -93,5 +97,6 @@ spec:
metricType: Utilization # Allowed types are 'Utilization' or 'AverageValue'
metadata:
value: "50"
activationValue: "30"
containerName: "foo"
```
5 changes: 5 additions & 0 deletions content/docs/2.16/scalers/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ triggers:
- `value` - Value to trigger scaling actions for:
- When using `Utilization`, the target value is the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.
- When using `AverageValue`, the target value is the target value of the average of the metric across all relevant pods (quantity).
- `activationValue` - Target value for activating the scaler. Learn more about activation [here](https://keda.sh/docs/2.15/concepts/scaling-deployments/#activating-and-scaling-thresholds). (Default: 0, Optional)
- When using `Utilization`, the target value is `Utilization`
- When using `AverageValue`, the target value is `AverageValue`
- `containerName` - Name of the specific container to scale based on its memory, rather than the entire pod. Defaults to empty if not specified.

> 💡 **NOTE:** `containerName` parameter requires Kubernetes cluster version 1.20 or higher with `HPAContainerMetrics` feature enabled. Please see [container resource metrics](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#container-resource-metrics) for more information.
Expand All @@ -75,6 +78,7 @@ spec:
metricType: Utilization # Allowed types are 'Utilization' or 'AverageValue'
metadata:
value: "50"
activationValue: "30"
```

The following example targets memory utilization of a specific container (`foo`) in a pod.
Expand All @@ -94,4 +98,5 @@ spec:
metadata:
value: "50"
containerName: "foo"
activationValue: "30"
```
Loading