Skip to content

Commit

Permalink
[v14] Warn about CPU limits in teleport-cluster Helm chart (#36289)
Browse files Browse the repository at this point in the history
* Warn about CPU limits

* fixup! Warn about CPU limits
  • Loading branch information
hugoShaka committed Jan 4, 2024
1 parent 0f2331a commit 6a5b572
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/pages/reference/helm-reference/teleport-cluster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,15 @@ A `postStart` lifecycle handler to be configured on the main Teleport container.
Resource requests/limits which should be configured for Teleport containers. These resource limits will also be
applied to `initContainers`.

<Admonition type="danger">
Setting CPU limits is an anti-pattern and is harmful in most cases. Unless you enabled
[the Static CPU management policy](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy),
a multithreaded workload with CPU limits will very likely not behave the way you expect when approaching its CPU limit.

Teleport will become unstable once throttling starts. We recommend not to set CPU limits.
See [the GitHub PR](https://github.com/gravitational/teleport/pull/36251) for technical details.
</Admonition>

`values.yaml` example:

```yaml
Expand Down
10 changes: 10 additions & 0 deletions examples/chart/teleport-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,20 @@ postStart:

# Resources to request for the teleport container
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
#
# DANGER: Setting CPU limits is an anti-pattern and harmful in most cases.
# Unless you enabled [the Static CPU management policy](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy),
# a multithreaded workload with CPU limits will very likely not behave the way
# you expect when approaching its CPU limit.
#
# Teleport will become unstable once throttling starts. We recommend not to set CPU limits.
# See [the GitHub PR](https://github.com/gravitational/teleport/pull/36251) for technical details.
resources: {}
# requests:
# cpu: "1"
# memory: "2Gi"
# limits:
# memory: "2Gi"

# Security context to add to the container
securityContext: {}
Expand Down

0 comments on commit 6a5b572

Please sign in to comment.