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

add leader election and multi replica support #64

Merged
merged 6 commits into from
Jul 12, 2023
Merged

add leader election and multi replica support #64

merged 6 commits into from
Jul 12, 2023

Conversation

OliverMKing
Copy link
Collaborator

@OliverMKing OliverMKing commented Jul 10, 2023

Description

Adds full leader election and multi replica support to the operator. This is a requirement for resiliency through a PDB and is needed as clusters move towards more automatic upgrade scenarios. A PDB + multiple replicas is the best way to ensure the operator continues to function after a cluster upgrade (and really throughout all scenarios).

You can see below how this is an active-passive HA model where only the replica with the leader election lock performs actions.
image

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested locally + e2e. This change is really just taking advantage of built-in controller runtime features which is a well tested and well established k8s library.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@OliverMKing
Copy link
Collaborator Author

/ok-to-test sha=63d1a5c

1 similar comment
@OliverMKing
Copy link
Collaborator Author

/ok-to-test sha=63d1a5c

Copy link
Contributor

@davidgamero davidgamero left a comment

Choose a reason for hiding this comment

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

lgtm

@OliverMKing
Copy link
Collaborator Author

/ok-to-test sha=63d1a5c

@OliverMKing
Copy link
Collaborator Author

/ok-to-test sha=70daac1

@OliverMKing OliverMKing merged commit 97c6631 into Azure:main Jul 12, 2023
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.

3 participants