Skip to content

Commit

Permalink
docs(scalers): Update cpu and memory scaler docs for validating `…
Browse files Browse the repository at this point in the history
…requests`/`limits` from `LimitRange` (#1296)

* docs(scalers): Update cpu and memory scaler docs

Update for cpu & memory scalers for KEDA controller checking for
default limits and requests in LimitRange, for Container type, in the
same namespace, for validation when the container resources are not
specified in the pod spec.

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com>
  • Loading branch information
3 people authored Jan 18, 2024
1 parent 535be78 commit 68608bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions content/docs/2.13/scalers/cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ go_file = "cpu_memory_scaler"
### Prerequisites

KEDA uses standard `cpu` and `memory` metrics from the Kubernetes Metrics Server, which is not installed by default on certain Kubernetes deployments such as EKS on AWS. Additionally, the `resources` section of the relevant Kubernetes Pods must include `requests` (at a minimum).
KEDA uses standard `cpu` and `memory` metrics from the Kubernetes Metrics Server, which is not installed by default on certain Kubernetes deployments such as EKS on AWS. Additionally, the `resources` section of the relevant Kubernetes Pods must include at least one of `requests` or `limits`.

- The Kubernetes Metrics Server must be installed. Installation instructions vary based on your Kubernetes provider.
- The configuration for your Kubernetes Pods must include a `resources` section with specified `requests`. See [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). If the resources section is empty (`resources: {}` or similar) the error `missing request for {cpu/memory}` occurs.
- The configuration for your Kubernetes Pods must include a `resources` section with specified `requests` (or `limits`). See [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). If the resources section is empty (`resources: {}` or similar), KEDA checks if the `defaultRequest` (or `default` for limits) is set in `LimitRange` for the `Container` type in the same namespace. If `defaultRequest` (or `default` for limits) is missing too, the error `missing request for {cpu/memory}` occurs.

```yaml
# a working example of resources with specified requests
Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.13/scalers/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ go_file = "cpu_memory_scaler"
KEDA uses standard `cpu` and `memory` metrics from the Kubernetes Metrics Server, which is not installed by default on certain Kubernetes deployments such as EKS on AWS. Additionally, the `resources` section of the relevant Kubernetes Pods must include `requests` (at a minimum).

- The Kubernetes Metrics Server must be installed. Installation instructions vary based on your Kubernetes provider.
- The configuration for your Kubernetes Pods must include a `resources` section with specified `requests`. See [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). If the resources section is empty (`resources: {}` or similar) the error `missing request for {cpu/memory}` occurs.
- The configuration for your Kubernetes Pods must include a `resources` section with specified `requests` (or `limits`). See [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). If the resources section is empty (`resources: {}` or similar), KEDA checks if the `defaultRequest` (or `default` for limits) is set in `LimitRange` for the `Container` type in the same namespace. If `defaultRequest` (or `default` for limits) is missing too, the error `missing request for {cpu/memory}` occurs.

```yaml
# a working example of resources with specified requests
Expand Down

0 comments on commit 68608bd

Please sign in to comment.