aws-samples / aws-samples/amazon-cloudwatch-container-insights
cloudwatch-agent CPU request too high, unable to patch
- 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
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