Skip to content

Commit

Permalink
doc: document the ignore balloons policy option
Browse files Browse the repository at this point in the history
Signed-off-by: Antti Kervinen <[email protected]>
  • Loading branch information
askervin committed Sep 30, 2024
1 parent c8054b8 commit c224cc0
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions docs/resource-policy/policy/balloons.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ Balloons policy parameters:
cause kernel to kill containers due to out-of-memory error when
closest NUMA nodes do not have enough memory. In this situation
consider switching this option `false`.
- `ignore` specifies containers that should be completely ignored by
the policy.
- `matchExpressions` if a container matches an expression in this
list, then the policy will ignore the container. Example: force
ignoring containers named "a" and "b". As a result, the policy will not
modify CPU or memory pinning of matching containers.
```
ignore:
matchExpressions:
- key: name
operator: In
values:
- a
- b
```
- `idleCPUClass` specifies the CPU class of those CPUs that do not
belong to any balloon.
- `reservedPoolNamespaces` is a list of namespaces (wildcards allowed)
Expand Down Expand Up @@ -315,8 +330,15 @@ not defined, a built-in `default` balloon type is used.
## Disabling CPU or Memory Pinning of a Container

Some containers may need to run on all CPUs or access all memories
without restrictions. Annotate these pods and containers to prevent
the resource policy from touching their CPU or memory pinning.
without restrictions. There are two alternatives to achieve this:
policy configuration and pod annotations.

The resource policy will not touch allowed resources of containers
that match `ignore` criteria. See policy configuration options above.

Alternatively, pod annotations can opt-out all or selected containers
in the pod from CPU or memory pinning by preserving whatever existing
or non-existing pinning configuration:

```yaml
cpu.preserve.resource-policy.nri.io/container.CONTAINER_NAME: "true"
Expand Down

0 comments on commit c224cc0

Please sign in to comment.