-
Notifications
You must be signed in to change notification settings - Fork 506
[FLINK-29919] Support operator leader election #434
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
Conversation
|
cc @morhidi |
gaborgsomogyi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically looks good, only questions/nits.
| int exceptionFieldLengthThreshold; | ||
| int exceptionThrowableCountThreshold; | ||
| String labelSelector; | ||
| LeaderElectionConfiguration leaderElectionConfiguration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: any reason why these are not private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lombok @value makes them private
| try { | ||
| new FlinkOperator(operatorConfig); | ||
| } catch (IllegalConfigurationException ice) { | ||
| assertTrue(ice.getMessage().startsWith("Lease name must be defined")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe we can mention either the feature (leader election) or config name. Such case one don't need to dig for conf name just copy-paste.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, now see that the feature later mentioned. Maybe adding the key would provide more convenience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I will add this
|
+1 LGTM overall. Some e2e would be nice. Is this going to be the recommended prod setup or we're not sure yet? |
I think the recommended setup is without leader election as it's a very optional feature. I think most prod settings do not require this and it only adds complication |
What is the purpose of the change
Support enabling and configuring leader election for the kubernetes operator to make it possible to run standby operator instances.
Brief change log
Verifying this change
FlinkOperatorTestto cover the leader election config.Does this pull request potentially affect one of the following parts:
CustomResourceDescriptors: noDocumentation