Fix dynamic update of the default backend #680
Merged
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.
Since v0.11, all cluster updates try to be partially applied in the in-memory model. This is addressed building an object tracking, followed by purging the old state and recreating these same objects in the new state. In short ingress objects track hostnames, services and secrets, and services track endpoints.
Default backends wasn't being updated because it exposes a service without using an ingress object, so endpoints are deployed on a full synchronization, including de first one, and wasn't tracker anymore. This update creates a dummy tracking point to bind the default backend endpoints and the haproxy model.
This update also needed to manage an issue with the backend ID: the default backend is renamed to
_default_backend
when assigned as such, and changed back when unassiged. This unassignment happens when the backend is purged in order to have its internal state updated, and such asynchrony should be fixed in the dynupdate. Now dynupdate compares backends based on an internal and immutable state.Fixes #673