Skip to content

Prioritize "Ready" Pods in SandboxClaim adoption logic #189

@janetkuo

Description

@janetkuo

The SandboxClaim controller currently adopts the oldest pod from the warm pool regardless of its state. If the oldest pod is unhealthy (e.g., CrashLoopBackOff or Pending), the claim adopts it and stalls, defeating the purpose of a warm pool.

In the adoption logic, we should prioritize pod health:

  1. Sort pods primarily by Readiness (Running & Ready condition).
  2. Use CreationTimestamp (oldest first) only as a tie-breaker.

We could consider supporting different types of adoption strategy in claim, such as AdoptionStrategy: Any | PreferReady | StrictReady.

/kind feature

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions