Provider Connectors
Take over from another rightsizer
Move a namespace from another tool that sizes pods at admission to LevelFour, with no pod falling back to a holding value, and hand it back in one step.
Some teams leave requests and limits out of their manifests and let a rightsizing tool set them as each pod is admitted, often with a LimitRange default as a holding value until that tool answers. Taking such a namespace over moves it to LevelFour's automation without any new pod starting on the holding value, and without a moment where two tools size the same pod.
Before you start
- Agent 0.8.0 or later, with the automation component and its webhook on. The namespace must be in
automation.allowedNamespacesand opted in to recommendations. Install it covers the values. - The other tool's namespace label in
automation.webhook.excludedNamespaceLabels, askey=value. The API server then never sends LevelFour's webhook a pod from a namespace carrying that label, so each pod has one sizer, whatever order the webhooks run in. The component reports those namespaces to LevelFour every minute. The chart names no label by default. Until yours names one, LevelFour cannot see the other tool leave, and the dashboard keeps Take over off with the value to set. - Port 9443 open from the control plane to the webhook's pods.
automation:
enabled: true
allowedNamespaces:
- payments
webhook:
enabled: true
excludedNamespaceLabels:
- example.com/rightsizing=enabledEach workload's drawer names the tools that size it today, so you can see what the other tool controls before you move anything.
Take a namespace over
Mark the namespace
An admin opens the namespace from the cluster's Automation tab and selects Take over in its Take over from the other tool card, while the other tool still runs there. Once the other tool's label leaves the namespace, new Deployment and StatefulSet pods start at the most their containers held in the last 24 hours, for each request and limit, raised to the memory a container needed after an OOM kill. They never start at the LimitRange default.
Turn the other tool off for the namespace
Turn the other tool off in that namespace, so its label leaves it. LevelFour's webhook then receives the namespace's pods and serves them those values.
Wait for the freeze
LevelFour freezes the namespace's values once all of these hold: the component reports the label gone, an hourly report after that shows no value only the other tool explains, every Deployment and StatefulSet container has a value, and the component confirms most running pods hold the values it serves. That takes up to two hourly reports. From the freeze on, the automation acts there as its settings allow, starting from the frozen values.
The card lists what still holds the freeze, each with what to do. If the other tool set a value after its label went off, only a new mark clears it: once that tool is off for good, select Mark again, and LevelFour reads the values from that moment.
What keeps pods safe
- Values the cluster ran. The values the webhook measures its guards from are ones the component saw most running pods of that container hold, so a value LevelFour sends but the cluster never ran loosens nothing. The component keeps what it saw for 14 days, through a restart.
- Guards. A new pod gets at most twice those values and never more than
automation.hardLimits. A value past a guard is brought back to the nearest one allowed, and the pod carrieslevelfour.ai/clampednaming it. - OOM kills. Memory raised after an OOM kill is kept for new pods, as request and limit together when the container ran with its memory request equal to its limit, and the automation does not cut it for 14 days.
- What it leaves to the other tool. Only Deployment and StatefulSet pods get these values. Jobs, CronJobs and DaemonSets keep the other tool's values, or their manifest values once that tool is off, and they never hold the freeze. The card lists them under Start from the template.
Hand it back
Put the other tool's label back on the namespace. The API server stops sending its pods to LevelFour's webhook, and the other tool sizes the next ones. Then select End takeover in the dashboard. LevelFour stops serving the values it took over and drops the memory it raised after OOM kills. Containers it already resized under its settings keep that size. Nothing in LevelFour has to answer for the hand-back to work.
Put the label back before opting out
levelfour.ai/automation: "off" keeps LevelFour out of the namespace entirely, so its webhook serves nothing there. If the other tool's label is not back first, new pods start on their manifest values, which is the LimitRange default where the manifest leaves them out.
When something is down
| Situation | New pods | Running pods |
|---|---|---|
| Automation stopped (pause, or stop and revert) | Start at the values they ran with before LevelFour, raised after an OOM kill, never the holding value | Stop and revert moves the requests LevelFour changed back to those values; limits stay |
| LevelFour's webhook unreachable | Kubernetes admits them on their manifest values, the LimitRange default where the manifest leaves them out | The component resizes their requests to LevelFour's values in place within seconds; the limit follows at the next rollout |
| LevelFour unreachable | Served as before for 7 days; after that, a taken-over container keeps the values it ran with or higher, and the pod carries levelfour.ai/expired | Unchanged; the component writes nothing until LevelFour answers |
The webhook runs three copies spread across zones, behind a PodDisruptionBudget that lets one go at a time. With priorityClass.create and automation.webhook.useChartPriorityClass, they are scheduled ahead of the pods they size after a Spot reclaim. To stop serving expired values without LevelFour, put the other tool's label back, delete the levelfour-desired-<namespace>-<n> ConfigMaps in the agent's namespace, or uninstall the chart.
Automation
The optional component that resizes running pods toward their targets and after OOM kills or throttling, configured with objects in your cluster, and stopped or reverted in one step.
Configure the agent
Chart values for the LevelFour agent, and how to read Prometheus history, publish cost metrics, measure network by destination, turn on the JVM reader, send through a proxy, pull from a private registry and verify the release signatures.