-
Notifications
You must be signed in to change notification settings - Fork 498
[FLINK-26290] Introduce serviceAccount as direct field, remove taskSlots #10
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
6c04f00 to
a77dfd1
Compare
| image: flink:1.14.3 | ||
| flinkVersion: 1.14.3 | ||
| flinkConfiguration: | ||
| taskmanager.numberOfTaskSlots: "2" |
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.
@gyfora as follow-up I would suggest that we can handle yaml number types and don't assume Configuration.setString will just work. That way users won't need to quote numbers..
wangyang0918
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.
@tweise Thanks for creating this PR. Regarding the serviceAccount and taskSlots, could you please share the guideline which fields should or should not be first-class?
| KubernetesConfigOptions.ServiceExposedType.ClusterIP); | ||
| } | ||
|
|
||
| if (spec.getServiceAccount() != null) { |
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.
Maybe we need to set KubernetesConfigOptions#KUBERNETES_SERVICE_ACCOUNT here. If the user wants to give the TaskManager pods less permissions, then they should create different service accounts for both and configure them in jobManager and taskManager fields.
Note: The reason why we need to configure service account for TaskManager pod is about the Kubernetes HA. TaskManagers retrieve leader information from K8s ConfigMap.
The e2e test is failing also because of this.
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.
Thanks for catching the config parameter issue. Fix is pushed. This just reinforces why we should not expose such implementation details to user (CR should abstract how we interact with k8s and also work for standalone mode).
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.
We also need to add the field serviceAccount to JobManagerSpec and TaskManagerSpec. Right? Otherwise, user could not configure service account for JobManager pod separately or have different service accounts for both.
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.
Since separate service accounts for jm and tm pods are a rare advanced usage, they can be covered with the pod templates, which are already available separately for jm and tm.
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.
Make sense to me.
a77dfd1 to
5b97b97
Compare
We don't have a strict guideline on that yet, but covered it a bit here: https://lists.apache.org/thread/x4ykd83bj330x7gqohdw0m8x0v54m083 and also on the FLIP: https://cwiki.apache.org/confluence/display/FLINK/FLIP-212%3A+Introduce+Flink+Kubernetes+Operator#FLIP212:IntroduceFlinkKubernetesOperator-InitialFeatureSet |
This is a good point and explains why we need to make |
|
Hi @tweise I left one concern for this PR I think we should avoid to introduce option as first class field when there is already config in Flink have the same effect, It brings the proxy work and may make user confused. As described in https://lists.apache.org/thread/3q5bmr9253opv5b122s9nokp8yqq5rmw
So I think the |
|
@Aitozi I am afraid the service account related config options(e.g. |
|
@wangyang0918 I have not seen the standalone mode |
|
I think what Thomas did makes a lot of sense. The service account config is pretty confusing and easy to get wrong. This way we can set the relevant settings depending on the mode (native/standalone). +1, I am rebasing this on the config changes and merging afterwards |
No description provided.