22d672c57e79086501f65250142c3cb5760ce8f3
createOrGetDeployment read the Deployment once and then reused that copy's Status.AvailableReplicas to decide whether to wait for readiness. On the scale-from-zero path the read happens while the idle reaper's pod is still terminating, so the pre-scale status can still report an available replica and the readiness wait is skipped. The executor then returns a Service whose endpoints are empty and the router's forward fails with a 500. Track whether we issued the scale-up and always wait for the deployment in that case; WaitForDeployment re-reads from the API server, so an already available deployment still returns on its first poll.
Languages
Go
100%