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

No-leader-election mode for BGP and fixes for routing table mode #740

Merged

Conversation

p-strusiewiczsurmacki-mobica
Copy link
Contributor

@p-strusiewiczsurmacki-mobica p-strusiewiczsurmacki-mobica commented Jan 24, 2024

This PR should fix #729

Added support for non-election-mode for BGP + some fixes for Service Policy in non-leader-election mode in routing table mode.

Additionally fixed some issues I found in BGP mode when global leader election or service election is enabled (e.g addresses were announced but were never deleted.

Current state is:

BGP announcement:

Golbal leader Service leader No-leader
Cluster All nodes All nodes All nodes if at least 1 endpoint exists
Local All nodes Leader only All nodes with endpoint

Routing table:

Golbal leader Service leader No-leader
Cluster Leader only Leader only All nodes if at least 1 endpoint exists
Local Leader only Leader only All nodes with endpoint

Tagging it as draft for now.

Signed-off-by: Patryk Strusiewicz-Surmacki <patryk-pawel.strusiewicz-surmacki@external.telekom.de>
Signed-off-by: Patryk Strusiewicz-Surmacki <patryk-pawel.strusiewicz-surmacki@external.telekom.de>

case watch.Deleted:
if !sm.config.EnableServicesElection && !sm.config.EnableLeaderElection && sm.config.EnableRoutingTable {
// When no-leade-elecition mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// When no-leade-elecition mode -> // When no-leader-election mode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@thebsdbox
Copy link
Collaborator

Looking good! Much left that needs adding?

@thebsdbox
Copy link
Collaborator

Any ETA on this @p-strusiewiczsurmacki-mobica ?

@p-strusiewiczsurmacki-mobica
Copy link
Contributor Author

Hi @thebsdbox, I'm waiting for @Cellebyte to test it with some real-life setup. I think we should be able to get this done unitl next week max.

Signed-off-by: Patryk Strusiewicz-Surmacki <patryk-pawel.strusiewicz-surmacki@external.telekom.de>
@Cellebyte
Copy link
Collaborator

@thebsdbox and @p-strusiewiczsurmacki-mobica I will build a new image and start testing ;)

@Cellebyte
Copy link
Collaborator

Cellebyte commented Jan 31, 2024

So from my testing.

  • BGP (no leader-election)
    • ExternalTrafficPolicy: Cluster announces on all nodes as expected.
    • ExternalTrafficPolicy: Local announces on all nodes which have an endpoint.
  • Route Table (no leader-election)
    • ExternalTrafficPolicy: Cluster announces on all nodes as expected.
    • ExternalTrafficPolicy: Local announces on all nodes which have an endpoint.

I did not test again the deletion case which was already working as expected in the already merged PR.

@p-strusiewiczsurmacki-mobica p-strusiewiczsurmacki-mobica marked this pull request as ready for review January 31, 2024 17:01
@thebsdbox
Copy link
Collaborator

Looks good, going to merge this and create a new release! 🎉

@thebsdbox thebsdbox merged commit 34a4352 into kube-vip:main Feb 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] BGP Mode does not advertise externalTrafficPolicy: Local correctly.
3 participants