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

[INTERNAL] Create uniq leader ID per operator deployment #76

Merged
merged 4 commits into from
Apr 16, 2024

Conversation

dobrerazvan
Copy link

Previously the LeaderElectionID was fixed value and in case of having multiple koperator per namespace, only one deployment would had leader elected as all deployments use the same Leases resource to vote.

Before, 4 koperator deployments, 1 lease:

kubectl get leases.coordination.k8s.io
NAME                                                                 HOLDER                                                                                                 AGE
controller-leader-election-helper                                    kafka-operator-7bdd0f84-918c-42d0-8c0d-d985c1618eff-67b74bhhwn2_b169f79e-220c-4689-8cee-4eb5367cb2bd   118m

With this Pr, 4 koperator deployments, each with its own lease:

kubectl get leases.coordination.k8s.io
NAME                                                                 HOLDER                                                                                                 AGE
controller-leader-election-helper-03cbebb919261de2a721099fbb406afa   kafka-operator-778d531e-4581-4280-8ad6-5db17d98c9fa-77d7879h272_890403af-3918-45d3-9864-9da24480b66c   5m31s
controller-leader-election-helper-3f84c0d23228173b493bdd7ae5bd720f   kafka-operator-d80e2ebc-1115-413d-9c33-94e0454dc358-7d9c7c95flj_1e860178-201c-4f9e-9c6b-505d55c519bd   5m31s
controller-leader-election-helper-c89feeb47bb697c7cb7f46b1e8186fef   kafka-operator-eeb8741f-79cc-436b-bb99-38e0cced87df-576c79phrnk_f127c765-6762-4501-86f8-638388c274e5   5m31s
controller-leader-election-helper-d41d8cd98f00b204e9800998ecf8427e   kafka-operator-778d531e-4581-4280-8ad6-5db17d98c9fa-69b755p55jp_2d78cf9d-4ae7-439c-91c5-f1b5069b3c49   21m

@dobrerazvan dobrerazvan merged commit bb519ee into master Apr 16, 2024
6 checks passed
@dobrerazvan dobrerazvan deleted the hash_leader_id branch April 16, 2024 08:35
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 29, 2024
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 29, 2024
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 30, 2024
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 30, 2024
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 30, 2024
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 30, 2024
aguzovatii pushed a commit to aguzovatii/koperator that referenced this pull request May 30, 2024
hvan pushed a commit that referenced this pull request Nov 13, 2024
* Fix flaky test by deleting nodeports explicitly (#67)

* Upgrade Kafka to 3.6.0 (#69)

* Upgrade dependencies

* Fix wrong port on expectEnvoyWithConfigAz2Tls test (#70)

* Upgrade Kafka to 3.6.1 (#71)

Co-authored-by: Petruț™ <[email protected]>

* Upgrade Kafka image to use Java v21 (#72)

* Added arm64 to docker build platforms (#73)

* Added arm64 to docker build platforms

* Regenerated headers for 2024

* Upgrading Kafka to 3.7.0 (#77)

* Update codeql-analysis.yml (#78)

* [INTERNAL] Create uniq leader ID per operator deployment (#76)

* [INTERNAL] Get watched namespaces from env variable (#75)

(cherry picked from commit de6500b)

* [CORE-106517] Fix outdated config in the sample (#83)

* Cross-compile koperator for arm and intel. (#84)

* Adding Contour Ingress support (#82)

* Allow property security-inter-broker-protocol  (#85)

* adding the ability to use security-inter-broker-protocol in koperator

* updating util.go to remove _ for generated names

* adding replace all for external listener port name

* fixing other places where externallistener name is used to not have _

* adding an alternative way to identify which port to use for kafka administration and cc connection

* taking out comments for pr push

* fixing kafka crd

* setting omitempty so it will not be required

* adding generated crds

* adding comments with context for new flag UsedForKafkaAdminCommunication

* Use getBrokerReadOnlyConfig function to get properties and update unit test - security_inter_broker_protocol_Set

* Update crds to match generated manifest

---------

Co-authored-by: Cameron Wright <[email protected]>
Co-authored-by: Ha Van <[email protected]>

---------

Co-authored-by: ctrlaltluc <[email protected]>
Co-authored-by: Adi Muraru <[email protected]>
Co-authored-by: Razvan Dobre <[email protected]>
Co-authored-by: Cristian-Petrut Petrache <[email protected]>
Co-authored-by: Petruț™ <[email protected]>
Co-authored-by: Adrian Muraru <[email protected]>
Co-authored-by: Adrian <[email protected]>
Co-authored-by: aguzovatii <[email protected]>
Co-authored-by: cawright-rh <[email protected]>
Co-authored-by: Cameron Wright <[email protected]>
Co-authored-by: Ha Van <[email protected]>
Co-authored-by: Daniel Vaseekaran <[email protected]>
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.

2 participants