mirror of
https://github.com/status-im/consul.git
synced 2025-02-20 01:18:49 +00:00
This is useful when updating an config entry with no services, and the expected behavior is that envoy closes all listeners and clusters. We also allow empty routes because ingress gateways name route configurations based on the port of the listener, so it is important we remove any stale routes. Then, if a new listener with an old port is added, we will not have to deal with stale routes hanging around routing to the wrong place. Endpoints are associated with clusters, and thus by deleting the clusters we don't have to care about sending empty endpoint responses.