aws-samples / aws-samples/amazon-cloudwatch-container-insights

cloudwatch-agent CPU request too high, unable to patch

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
178
Forks
117
Avg merge
1d 10h
Merged PRs (30d)
3

Description

I have v1.7.0-eksbuild.1 of the amazon-cloudwatch-observability add-on installed. Kubernetes 1.27.

```
kubectl get daemonset cloudwatch-agent -n amazon-cloudwatch -o yaml | grep -A6 'resources:'
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 128Mi
```
This is too high for our use on a small cluster with 2 vCPU nodes. I would like to reduce it.
```
kubectl patch daemonset cloudwatch-agent -n amazon-cloudwatch --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/resources/requests/cpu", "value": "50m"}]'
```
But it is immediately reverted. I also tried pulling down the yaml, editing, and applying to have the same result. Is there something in the background monitoring that config to confirm compliance with the add-on? Is there any strategy I can use to reduce the CPU request?

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the cloudwatch-agent DaemonSet in the amazon-cloudwatch namespace with the kubectl commands shown in the issue. Determine what immediately restores the CPU request after a patch or apply, then identify the supported strategy for lowering it. Done means documenting or implementing a way to use a lower request without it being reverted.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
infrastructure, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.