Evictor configuration ownership
Find out whether Cast AI or your cluster owns the Evictor configuration, and where to make changes: the Cast AI console, your EvictorConfig resource, or your Helm values.
Evictor settings include the bin-packing switch, cycle interval, node grace period, and advanced eviction rules. Their owner determines where you change them:
- Cast AI: use the console, API, or Terraform. Cast AI applies your changes to the cluster.
- Your cluster: use your
EvictorConfigresource or the configuration supplied by your installation. Cast AI displays these settings but does not make them editable in the console.
Cast AI determines the owner automatically on every cluster sync. There is no separate ownership setting in the console.
Check the configuration owner
In the console, open the Bin-packing page under Automation:
| Console state | Owner and configuration source |
|---|---|
| Editable settings | Cast AI |
| Read-only settings with "Bin-packing is managed by your cluster." | Your cluster, through an EvictorConfig resource |
| Read-only settings with "Bin-packing settings come from your installation." and a working on/off switch | Your cluster, through a legacy self-managed installation |
Through the API, read configOwnership from GET /workload-eviction/v1/clusters/{clusterId}/config:
| Value | Owner and configuration source | API behavior |
|---|---|---|
castai | Cast AI | The API accepts configuration changes and applies them to the cluster. |
self-managed | Your cluster, through an EvictorConfig resource | Basic configuration changes return 409 Conflict. See Advanced configuration and policies writes for other write paths. |
self-managed-legacy | Your cluster, through an installation without an EvictorConfig resource | Turning bin-packing on or off takes effect. The API mirrors other settings from your installation. |
| Empty | No Evictor, or ownership not classified yet | The API accepts changes and applies them once Cast AI manages an Evictor. |
configOwnership and status are read-only fields. The API ignores any values you supply for these fields in an update.
How Cast AI determines the owner
Cast AI checks the EvictorConfig resource, when present, and how you or Cast AI manage the Evictor deployment:
EvictorConfig resource | Evictor deployment | configOwnership |
|---|---|---|
spec.managementMode: castai | Managed by Cast AI | castai |
spec.managementMode: self-managed | Any | self-managed |
spec.managementMode: castai | Managed by you through Helm, ArgoCD, another GitOps tool, or a custom release | self-managed |
| Absent | Managed by Cast AI | castai |
| Absent | Managed by you | self-managed-legacy |
A Cast AI-mode resource does not override an externally managed deployment. Cast AI never writes to an Evictor deployment it does not manage. This often occurs with ArgoCD when the chart keeps the default managedByCASTAI: true. Set managedByCASTAI: false to make a self-managed installation explicit.
Change the configuration
Cast AI-managed installations
Use the console, API, or Terraform. Cast AI applies changes to the EvictorConfig resource and Evictor deployment, and overwrites manual edits to managed settings during a later sync.
See Evictor Configuration for available settings and their defaults.
Installations with an EvictorConfig resource
Edit the EvictorConfig resource directly, or edit the Helm values that render it, and apply the change with your usual tooling. To inspect the current resource, run:
kubectl get evictorconfig evictor-config -o yamlCast AI mirrors the values into its API and console on every sync. Set spec.enabled to turn bin-packing on or off. When managing through Helm, use evictorEnabled.
Legacy self-managed installations
Legacy installations without an EvictorConfig resource get their settings from Helm values and the deployment's environment variables. Advanced eviction rules come from the castai-evictor-config ConfigMap.
You can still turn bin-packing on or off from the console or API. Legacy Evictor agents read this switch from Cast AI. To manage all settings through an EvictorConfig resource, upgrade the installation.
Advanced configuration and policies writes
Enforcement currently differs between basic Evictor settings and the other write paths when configOwnership is self-managed:
PATCH /workload-eviction/v1/clusters/{clusterId}/configreturns409 Conflict. Change theEvictorConfigresource or its Helm values instead.PATCH /workload-eviction/v1/clusters/{clusterId}/advanced-configand policies v1 writes, including Terraform, currently accept and log changes rather than rejecting them. The values in theEvictorConfigresource overwrite those changes on the next sync. Do not rely on these writes to manage a self-managed installation.
Terraform applies that do not change Evictor values continue to work. This includes the castai_autoscaler Evictor block and the castai_evictor_advanced_config resource.
Change the owner
Move ownership to your cluster
Install or upgrade the castai-evictor chart (0.35.144 or newer) with these values:
managedByCASTAI: false
evictorEnabled: trueThe chart renders spec.managementMode: self-managed and spec.enabled: true in the EvictorConfig resource. For the equivalent values path in the umbrella chart, see Evictor Configuration.
If you change spec.managementMode by hand on an existing resource instead, spec.enabled keeps its current value. Cast AI only reads the resource, so nothing resets your enabled state.
SetevictorEnabled: trueexplicitlyThe chart default is
evictorEnabled: false. A self-managed installation keeps bin-packing off unless you enable it, and Cast AI does not enable it for you. If Evictor runs but never removes nodes, checkspec.enabledfirst.
Move ownership to Cast AI
Set managedByCASTAI: true, which renders spec.managementMode: castai. Cast AI applies its stored configuration to the cluster, including the enabled state. Enable bin-packing in the console or through the API.
If ArgoCD or another external tool controls the Evictor deployment, remove that deployment from the tool's sync scope first. managedByCASTAI: true does not override external deployment management.
Upgrade a legacy self-managed installation
Legacy installations continue to work, but Cast AI deprecated this configuration path in favor of the EvictorConfig resource. To upgrade:
-
Upgrade to Evictor chart 0.35.144 or newer. Keep
crdUpgrade.enabled: true(the default), so the upgrade installs the custom resource definition and theevictor-configresource. -
Choose whether your cluster or Cast AI should own the configuration.
-
Verify the resource:
kubectl get evictorconfig evictor-config -o yamlCheck that
spec.managementModematches your chosen owner and thatspec.enabledistrueif bin-packing should run. The console Bin-packing page displays the same state.
The upgrade does not carry your settings over. The job re-applies the rendered EvictorConfig resource on every upgrade. The resource takes your Helm values, including spec.enabled: false from the default evictorEnabled: false. This differs from a hand-edited managementMode change, which preserves spec.enabled.
See also
Updated 2 hours ago
