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

Create endpoints on a predictable order #1011

Merged
merged 1 commit into from
Jul 2, 2023
Merged

Conversation

jcmoraisjr
Copy link
Owner

Endpoints (internal haproxy ingress struct, not the k8s one) are part of the building blocks to configure a backend or a tcp listener. HAProxy Ingress uses deep equals on some structs in order to identify equality, hence the ability to skip a reload event. When two endpoint arrays have the same content but on distinct order, they are not considered equals, although it should from the haproxy and haproxy ingress perspective. Because of that we're sorting them.

The former update (which we're reverting here) was sorting the endpoints after they get named, so the order is right but some names might be changed. Now we're sorting the endpoints on its source.

Endpoints (internal haproxy ingress struct, not the k8s one) are part of
the building blocks to configure a backend or a tcp listener. HAProxy
Ingress uses deep equals on some structs in order to identify equality,
hence the ability to skip a reload event. When two endpoint arrays have
the same content but on distinct order, they are not considered equals,
although it should from the haproxy and haproxy ingress perspective.
Because of that we're sorting them.

The former update (which we're reverting here) was sorting the
endpoints after they get named, so the order is right but some names
might be changed. Now we're sorting the endpoints on its source.
@jcmoraisjr
Copy link
Owner Author

#999

@jcmoraisjr jcmoraisjr merged commit 1ec12d3 into master Jul 2, 2023
@jcmoraisjr jcmoraisjr deleted the jm-sort-endpoints branch July 2, 2023 21:52
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.

1 participant