Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic update of the default backend #680

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

jcmoraisjr
Copy link
Owner

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

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.
@jcmoraisjr jcmoraisjr merged commit 39b9c56 into master Oct 19, 2020
@jcmoraisjr jcmoraisjr deleted the jm-update-default-backend branch October 19, 2020 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting default-backend doesn't update backend configuration
1 participant