fix(cli): auto-select the sole listener for self-hosted deployments

_resolve_placement only called among() (added in #9056) for the
managed Cloud control plane. Self-hosted/hybrid workspaces with
exactly one listener never got it auto-selected, so an unplaced
deployment could land in the wrong Kubernetes namespace instead of
the listener's own.

among() already handles 0/1/many listeners correctly, so this just
removes the is_cloud gate and lets placement resolve the same way
for every control plane. Cloud's behavior is unchanged since it
already always called among().

Fixes #9220
This commit is contained in:
gdibben
2026-10-06 21:38:02 +01:00
parent 70dd64065b
commit dab5eef327
2 changed files with 26 additions and 8 deletions
-2
View File
@@ -1642,8 +1642,6 @@ class CustomerRegistrySource:
requested = self.requested_placement
if requested.listener_id is not None:
return requested.on(_requested_listener(ctx.client, requested.listener_id))
if not (ctx.endpoints.is_cloud or requested.requested):
return Unplaced()
return requested.among(_available_listeners(ctx.client))
def _announce(self, placement: Placement) -> None: