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.
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] 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:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
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.
Type of change
Please delete options that are not relevant.
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: