adapt traffic command to the possibility of missing non-segment routegroup/ingress #704
+49
−16
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.
Follow up on zalando-incubator/kubernetes-on-aws#9677
When public domains are filtered out on Stacks, like in the PR above, it can happen that individual Stacks don't have any RouteGroup or Ingress (besides the traffic segment). This trips up the traffic switch command as it waits for both the legacy ingress/routegroups as well as the traffic segments to become ready. The former doesn't exist so it never happens and hangs.
This change makes
stackset-controller
consider the RouteGroup "ready" when it wouldn't have any hostnames matching any cluster domains anyway. The respective code for not creating the RouteGroup/Ingress in this case is here.Traffic switching these days works entirely via the Traffic Segment RouteGroup/Ingresses, so maybe the old ones shouldn't be considered at all anymore. This is one step in this direction where it ignores them if it doesn't create them in the first place.