Skip to content

Allow safe-to-evict annotation to be overridden#855

Merged
zhming0 merged 1 commit into
buildkite:mainfrom
ceciliaschudel:cecilia-04-07-allow_safe-to-evict_annotation_to_be_overridden
Apr 15, 2026
Merged

Allow safe-to-evict annotation to be overridden#855
zhming0 merged 1 commit into
buildkite:mainfrom
ceciliaschudel:cecilia-04-07-allow_safe-to-evict_annotation_to_be_overridden

Conversation

@ceciliaschudel
Copy link
Copy Markdown
Contributor

@ceciliaschudel ceciliaschudel commented Apr 7, 2026

The cluster-autoscaler.kubernetes.io/safe-to-evict annotation is currently hardcoded to "false", preventing it from being overridden in Helm values. This causes jobs targeting spot nodes to never start in a GKE Autopilot cluster, because the cluster autoscaler refuses to scale up spot nodes for pods that disallow eviction.

Moves the annotation before the metadata merges so it acts as a default that can be overridden via DefaultMetadata or k8s plugin annotations.

Fixes #849

The cluster-autoscaler.kubernetes.io/safe-to-evict annotation was
hardcoded to "false" after DefaultMetadata and k8s plugin metadata
were merged, making it impossible to override. This caused jobs
targeting spot/preemptible nodes to never start, because the cluster
autoscaler refuses to scale up spot nodes for pods that block eviction.

Move the annotation before the metadata merges so it acts as a default
that can be overridden via DefaultMetadata or k8s plugin annotations.

Fixes buildkite#849

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ceciliaschudel ceciliaschudel requested a review from a team as a code owner April 7, 2026 19:33
Copy link
Copy Markdown
Contributor

@zhming0 zhming0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ceciliaschudel thank you very much for the contribution! LGTM!

@zhming0 zhming0 enabled auto-merge April 15, 2026 05:34
@zhming0 zhming0 merged commit f694a5f into buildkite:main Apr 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Make cluster-autoscaler.kubernetes.io/safe-to-evict annotation configurable

2 participants