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 EvictorConfig resource 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 stateOwner and configuration source
Editable settingsCast 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 switchYour cluster, through a legacy self-managed installation

Through the API, read configOwnership from GET /workload-eviction/v1/clusters/{clusterId}/config:

ValueOwner and configuration sourceAPI behavior
castaiCast AIThe API accepts configuration changes and applies them to the cluster.
self-managedYour cluster, through an EvictorConfig resourceBasic configuration changes return 409 Conflict. See Advanced configuration and policies writes for other write paths.
self-managed-legacyYour cluster, through an installation without an EvictorConfig resourceTurning bin-packing on or off takes effect. The API mirrors other settings from your installation.
EmptyNo Evictor, or ownership not classified yetThe 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 resourceEvictor deploymentconfigOwnership
spec.managementMode: castaiManaged by Cast AIcastai
spec.managementMode: self-managedAnyself-managed
spec.managementMode: castaiManaged by you through Helm, ArgoCD, another GitOps tool, or a custom releaseself-managed
AbsentManaged by Cast AIcastai
AbsentManaged by youself-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 yaml

Cast 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}/config returns 409 Conflict. Change the EvictorConfig resource or its Helm values instead.
  • PATCH /workload-eviction/v1/clusters/{clusterId}/advanced-config and policies v1 writes, including Terraform, currently accept and log changes rather than rejecting them. The values in the EvictorConfig resource 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: true

The 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.

⚠️

Set evictorEnabled: true explicitly

The 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, check spec.enabled first.

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:

  1. Upgrade to Evictor chart 0.35.144 or newer. Keep crdUpgrade.enabled: true (the default), so the upgrade installs the custom resource definition and the evictor-config resource.

  2. Choose whether your cluster or Cast AI should own the configuration.

  3. Verify the resource:

    kubectl get evictorconfig evictor-config -o yaml

    Check that spec.managementMode matches your chosen owner and that spec.enabled is true if 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


Did this page help you?