set_cluster_agent_resources
Resize the Ankra agent itself on a cluster: set its container's memory and CPU limits and requests. This is the fix for an ankra-agent that is OOMKilled at its memory limit (raise memory_limit, e.g. to "2Gi"); do not hand the user a helm or kubectl command for it. Ankra holds the sizing for the cluster, so every later agent upgrade and every reinstall renders it; an agent that accepts held sizing re-renders its own release at once, and an older one has its Deployment resized directly and keeps it through upgrades (the result's survives_agent_upgrades says whether that holds). Either way the agent restarts onto the new sizing, so the cluster reads as offline for a few seconds. Only the named members change; an empty string stops Ankra holding a member (the agent keeps its current value for it, so to change a value set a new one), and a call that matches what the agent already runs stores it without a restart. Requests are capped low on purpose (memory 128Mi-2Gi, CPU 50m-2) because the agent's old pod stops before the new one schedules and a request no node can place would leave the cluster without an agent; limits take memory 512Mi-16Gi and CPU 100m-8. A request above its limit is refused. Read the agent's current sizing with describe_resource on the Deployment ankra-agent in the agent's namespace, and its OOM history with get_events or get_pod_logs. Requires agents.manage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpu_limit | No | New CPU limit, as a Kubernetes quantity (100m to 8), e.g. "1" or "500m", or an empty string to stop holding it. | |
| cluster_id | No | UUID of the target cluster. Optional when a cluster is selected. | |
| cpu_request | No | New CPU request, as a Kubernetes quantity (50m to 2), or an empty string to stop holding it. Must not exceed the CPU limit. Usually leave unchanged. | |
| cluster_name | No | Exact name of the target cluster. Optional when a cluster is selected. | |
| memory_limit | No | New memory limit for the agent container, as a Kubernetes quantity (512Mi to 16Gi), e.g. "2Gi", or an empty string to stop holding it. Raise this for an OOMKilled agent. | |
| memory_request | No | New memory request, as a Kubernetes quantity (128Mi to 2Gi), or an empty string to stop holding it. Must not exceed the memory limit. Usually leave unchanged. |