Allow safe-to-evict annotation to be overridden#855
Merged
zhming0 merged 1 commit intoApr 15, 2026
Merged
Conversation
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>
zhming0
approved these changes
Apr 15, 2026
Contributor
zhming0
left a comment
There was a problem hiding this comment.
@ceciliaschudel thank you very much for the contribution! LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
cluster-autoscaler.kubernetes.io/safe-to-evictannotation 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