You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/12/21 14:47:44 UTC

[GitHub] [flink] blublinsky opened a new pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

blublinsky opened a new pull request #14447:
URL: https://github.com/apache/flink/pull/14447


   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   Currently, we only set the service account for JobManager. The TaskManager is using the default service account. Before the KubernetesHAService is introduced, it works because the TaskManager does not need to access the K8s resource(e.g. ConfigMap) directly. But now the TaskManager needs to watch ConfigMap and retrieve leader address. So if the default service account does not have enough permission, users could not specify a valid service account for TaskManager.
   
   
   ## Brief change log
   
   - New configuration parameter TASK_MANAGER_SERVICE_ACCOUNT created
   - Method getServiceAccount added to KubernetesTaskManagerParameters
   - Service account added to the pod creation in InitTaskManagerDecorator
   - InitTaskManagerDecoratorTest is extended to incorporate service account test
   
   ## Verifying this change
   
   This change added tests and can be verified by running unit tests
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / no) no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no) no
     - The serializers: (yes / no / don't know) no
     - The runtime per-record code paths (performance sensitive): (yes / no / don't know) no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know) yes
     - The S3 file system connector: (yes / no / don't know) no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no) yes
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) not documented
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308) 
   * b1b5c5016e4e38f895f0f0585662ba7150d2de74 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749513550


   @tillrohrmann is suggesting to introduce a common config option `kubernetes.service-account` as per default. @blublinsky would you mind to integrate this suggestion?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751159951


   @blublinsky
   Which other PRs do you mean?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-750721577


   Oh, thats not what the code snipet reads. Thats fine


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131) 
   * 3d0478020b4ab99477c428d79c877bdb68911808 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131) 
   * 3d0478020b4ab99477c428d79c877bdb68911808 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185) 
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-750721543


   You may take a look at how the following config options work as an example.
   * `env.java.opts`
   * `env.java.opts.jobmanager`
   * `env.java.opts.taskmanager`
   * `env.java.opts.historyserver`
   * `env.java.opts.client`
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749403427


   The commit message also needs to be refined. I think it could be `[FLINK-20664][k8s] Support setting service account for TaskManager pod`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751159447


   Thanks guys, can we do the same with other PRs?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3d0478020b4ab99477c428d79c877bdb68911808 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185) 
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong closed pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong closed pull request #14447:
URL: https://github.com/apache/flink/pull/14447


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319",
       "triggerID" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11321",
       "triggerID" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308) 
   * b1b5c5016e4e38f895f0f0585662ba7150d2de74 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319) 
   * 1581e2c1364f86f8249a5df6b7c50e60dd0e3c41 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11321) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-750338091


   Even with this approach the sequence for job manager and task manager should be different. otherwise, if a job manager account is defined it will always take precedence for both


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on a change in pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on a change in pull request #14447:
URL: https://github.com/apache/flink/pull/14447#discussion_r547112827



##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -60,6 +60,13 @@
 		.withDescription("Service account that is used by jobmanager within kubernetes cluster. " +
 			"The job manager uses this service account when requesting taskmanager pods from the API server.");
 
+	public static final ConfigOption<String> TASK_MANAGER_SERVICE_ACCOUNT =
+		key("kubernetes.taskmanager.service-account")
+			.stringType()
+			.defaultValue("default")
+			.withDescription("Service account that is used by taskmanager within kubernetes cluster. " +
+				"The task manager uses this service account when watching config maps on the API server.");

Review comment:
       ```suggestion
   				"The task manager uses this service account when watching config maps on the API server to retrieve leader address of jobmanager and resourcemanager.");
   ```

##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -60,6 +60,13 @@
 		.withDescription("Service account that is used by jobmanager within kubernetes cluster. " +
 			"The job manager uses this service account when requesting taskmanager pods from the API server.");
 
+	public static final ConfigOption<String> TASK_MANAGER_SERVICE_ACCOUNT =

Review comment:
       You need to run `mvn package -Dgenerate-config-docs -pl flink-docs -am -nsu -DskipTests` to regenerate the configuration docs.

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecoratorTest.java
##########
@@ -187,6 +189,11 @@ public void testPodAnnotations() {
 		assertThat(resultAnnotations, is(equalTo(ANNOTATIONS)));
 	}
 
+	@Test
+	public void testPodServiceAccountName() {
+		assertEquals(SERVICE_ACCOUNT_NAME, this.resultPod.getSpec().getServiceAccountName());

Review comment:
       ```suggestion
   		assertThat(SERVICE_ACCOUNT_NAME, is(this.resultPod.getSpec().getServiceAccountName()))
   ```
   
   In Flink, we prefer `assertThat` for assertion.

##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -60,6 +60,13 @@
 		.withDescription("Service account that is used by jobmanager within kubernetes cluster. " +
 			"The job manager uses this service account when requesting taskmanager pods from the API server.");
 
+	public static final ConfigOption<String> TASK_MANAGER_SERVICE_ACCOUNT =
+		key("kubernetes.taskmanager.service-account")

Review comment:
       I believe we also need to update the `native-kubernetes.md#RBAC` section. At least, we need to tell users they could set the service account for TaskManager via `kubernetes.taskmanager.service-account`. And it is necessary only Kubernetes HA mode,.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131) 
   * 3d0478020b4ab99477c428d79c877bdb68911808 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185) 
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-750718313


   @blublinsky Why the sequence for job manager and task manager should be different? In my opinion, the specific config option for jobmanager/taskmanager should always have the precedence.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749011479


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit d07b609bb46ad9f2bf471dedc2476e62191f4273 (Mon Dec 21 14:49:33 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751162371


   > [FLINK-20359](https://github.com/apache/flink/pull/14281),
   > [FLINK-20324](https://github.com/apache/flink/pull/14284),
   > [FLINK-15649](https://github.com/apache/flink/pull/14283)
   
   @blublinsky
   
   I'm sure we can continue with the discussions and code reviews for these issues, in the corresponding JIRA tickets and pull requests.
   
   I also noticed that, for the three PRs, non of the corresponding JIRA tickets are assigned. I'd like to kindly remind that, the Apache Flink community suggests to reaching consensus on the approach and getting assigned to the ticket by a committer before start working on the implementation. Please take a close look at [How to Contribute Code](https://flink.apache.org/contributing/contribute-code.html).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131) 
   * 3d0478020b4ab99477c428d79c877bdb68911808 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong commented on a change in pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong commented on a change in pull request #14447:
URL: https://github.com/apache/flink/pull/14447#discussion_r548777962



##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -53,13 +53,27 @@
 		.withDescription("The type of the rest service (ClusterIP or NodePort or LoadBalancer). " +
 			"When set to ClusterIP, the rest service will not be created.");
 
+	public static final ConfigOption<String> KUBERNETES_SERVICE_ACCOUNT =
+		key("kubernetes.service-account")
+		.stringType()
+		.defaultValue("default")
+		.withDescription("Service account that is used by jobmanager and taskmanger within kubernetes cluster. " +
+			"if specific JOB_MANAGER_SERVICE_ACCOUNT and/or TASK_MANAGER_SERVICE_ACCOUNT are not defined.");

Review comment:
       It might be more user friendly to mention the configuration keys rather than the java field names.
   
   And I believe we should also mention in descriptions of `JOB_MANAGER_SERVICE_ACCOUNT` and `TASK_MANAGER_SERVICE_ACCOUNT` that they will by default fallback to `KUBERNETES_SERVICE_ACCOUNT`.

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecoratorAccountTest.java
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.kubeclient.decorators;
+
+import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions;
+import org.apache.flink.kubernetes.kubeclient.FlinkPod;
+import org.apache.flink.kubernetes.kubeclient.KubernetesTaskManagerTestBase;
+
+import io.fabric8.kubernetes.api.model.Container;
+import io.fabric8.kubernetes.api.model.Pod;
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * General tests for the {@link InitJobManagerDecorator}.

Review comment:
       Inconsistent JavaDoc.

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitJobManagerDecoratorAccountTest.java
##########
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.kubeclient.decorators;
+
+import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions;
+import org.apache.flink.kubernetes.kubeclient.FlinkPod;
+import org.apache.flink.kubernetes.kubeclient.KubernetesJobManagerTestBase;
+
+import io.fabric8.kubernetes.api.model.Container;
+import io.fabric8.kubernetes.api.model.Pod;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * General tests for the {@link InitJobManagerDecorator}.
+ */
+public class InitJobManagerDecoratorAccountTest extends KubernetesJobManagerTestBase {
+
+	private static final String SERVICE_ACCOUNT_NAME = "service-test";
+	private static final String JOB_MANGER_SERVICE_ACCOUNT_NAME = "jm-service-test";
+
+	private Pod resultPod;
+	private Container resultMainContainer;
+
+	@Override
+	protected void setupFlinkConfig() {
+		super.setupFlinkConfig();
+
+		this.flinkConfig.set(KubernetesConfigOptions.KUBERNETES_SERVICE_ACCOUNT, SERVICE_ACCOUNT_NAME);
+		this.flinkConfig.set(KubernetesConfigOptions.JOB_MANAGER_SERVICE_ACCOUNT, JOB_MANGER_SERVICE_ACCOUNT_NAME);
+	}
+
+	@Override
+	protected void onSetup() throws Exception {
+		super.onSetup();
+
+		final InitJobManagerDecorator initJobManagerDecorator =
+			new InitJobManagerDecorator(this.kubernetesJobManagerParameters);
+		final FlinkPod resultFlinkPod = initJobManagerDecorator.decorateFlinkPod(this.baseFlinkPod);
+
+		this.resultPod = resultFlinkPod.getPod();
+		this.resultMainContainer = resultFlinkPod.getMainContainer();
+	}
+
+	@Test
+	public void testPodServiceAccountName() {
+		assertEquals(JOB_MANGER_SERVICE_ACCOUNT_NAME, this.resultPod.getSpec().getServiceAccountName());

Review comment:
       `assertThat(actual, is(expected))` is preferred.

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecoratorAccountTest.java
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.kubeclient.decorators;
+
+import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions;
+import org.apache.flink.kubernetes.kubeclient.FlinkPod;
+import org.apache.flink.kubernetes.kubeclient.KubernetesTaskManagerTestBase;
+
+import io.fabric8.kubernetes.api.model.Container;
+import io.fabric8.kubernetes.api.model.Pod;
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * General tests for the {@link InitJobManagerDecorator}.
+ */
+public class InitTaskManagerDecoratorAccountTest extends KubernetesTaskManagerTestBase {
+
+	private static final String SERVICE_ACCOUNT_NAME = "service-test";
+	private static final String TASK_MANAGER_SERVICE_ACCOUNT_NAME = "tm-service-test";
+
+	private Pod resultPod;
+	private Container resultMainContainer;

Review comment:
       Unused

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecoratorAccountTest.java
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.kubeclient.decorators;
+
+import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions;
+import org.apache.flink.kubernetes.kubeclient.FlinkPod;
+import org.apache.flink.kubernetes.kubeclient.KubernetesTaskManagerTestBase;
+
+import io.fabric8.kubernetes.api.model.Container;
+import io.fabric8.kubernetes.api.model.Pod;
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * General tests for the {@link InitJobManagerDecorator}.
+ */
+public class InitTaskManagerDecoratorAccountTest extends KubernetesTaskManagerTestBase {
+
+	private static final String SERVICE_ACCOUNT_NAME = "service-test";
+	private static final String TASK_MANAGER_SERVICE_ACCOUNT_NAME = "tm-service-test";
+
+	private Pod resultPod;
+	private Container resultMainContainer;
+
+	@Override
+	protected void setupFlinkConfig() {
+		super.setupFlinkConfig();
+
+		this.flinkConfig.set(KubernetesConfigOptions.KUBERNETES_SERVICE_ACCOUNT, SERVICE_ACCOUNT_NAME);
+		this.flinkConfig.set(KubernetesConfigOptions.TASK_MANAGER_SERVICE_ACCOUNT, TASK_MANAGER_SERVICE_ACCOUNT_NAME);
+	}
+
+	@Override
+	protected void onSetup() throws Exception {
+		super.onSetup();
+
+		final InitTaskManagerDecorator initTaskManagerDecorator =
+			new InitTaskManagerDecorator(kubernetesTaskManagerParameters);
+
+		final FlinkPod resultFlinkPod = initTaskManagerDecorator.decorateFlinkPod(this.baseFlinkPod);
+		this.resultPod = resultFlinkPod.getPod();
+		this.resultMainContainer = resultFlinkPod.getMainContainer();
+	}
+
+	@Test
+	public void testPodServiceAccountName() {
+		assertThat(TASK_MANAGER_SERVICE_ACCOUNT_NAME, is(this.resultPod.getSpec().getServiceAccountName()));

Review comment:
       ```suggestion
   		assertThat(this.resultPod.getSpec().getServiceAccountName(), is(TASK_MANAGER_SERVICE_ACCOUNT_NAME));
   ```
   The util method is defined as follows. Out-of-ordered arguments could lead to improper error messages.
   ```
   public static <T> void assertThat(T actual, Matcher<? super T> matcher)
   ```
   

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitJobManagerDecoratorAccountTest.java
##########
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.kubeclient.decorators;
+
+import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions;
+import org.apache.flink.kubernetes.kubeclient.FlinkPod;
+import org.apache.flink.kubernetes.kubeclient.KubernetesJobManagerTestBase;
+
+import io.fabric8.kubernetes.api.model.Container;
+import io.fabric8.kubernetes.api.model.Pod;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * General tests for the {@link InitJobManagerDecorator}.

Review comment:
       Inconsistent JavaDoc.

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitJobManagerDecoratorAccountTest.java
##########
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.kubeclient.decorators;
+
+import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions;
+import org.apache.flink.kubernetes.kubeclient.FlinkPod;
+import org.apache.flink.kubernetes.kubeclient.KubernetesJobManagerTestBase;
+
+import io.fabric8.kubernetes.api.model.Container;
+import io.fabric8.kubernetes.api.model.Pod;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * General tests for the {@link InitJobManagerDecorator}.
+ */
+public class InitJobManagerDecoratorAccountTest extends KubernetesJobManagerTestBase {
+
+	private static final String SERVICE_ACCOUNT_NAME = "service-test";
+	private static final String JOB_MANGER_SERVICE_ACCOUNT_NAME = "jm-service-test";
+
+	private Pod resultPod;
+	private Container resultMainContainer;

Review comment:
       Unused




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319",
       "triggerID" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308) 
   * b1b5c5016e4e38f895f0f0585662ba7150d2de74 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319) 
   * 1581e2c1364f86f8249a5df6b7c50e60dd0e3c41 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-750718863


   If I want to define tm and jm accounts differently, then sequence definitely matters.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319",
       "triggerID" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11321",
       "triggerID" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b1b5c5016e4e38f895f0f0585662ba7150d2de74 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319) 
   * 1581e2c1364f86f8249a5df6b7c50e60dd0e3c41 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11321) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on a change in pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on a change in pull request #14447:
URL: https://github.com/apache/flink/pull/14447#discussion_r548783056



##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -53,13 +53,27 @@
 		.withDescription("The type of the rest service (ClusterIP or NodePort or LoadBalancer). " +
 			"When set to ClusterIP, the rest service will not be created.");
 
+	public static final ConfigOption<String> KUBERNETES_SERVICE_ACCOUNT =
+		key("kubernetes.service-account")
+		.stringType()
+		.defaultValue("default")
+		.withDescription("Service account that is used by jobmanager and taskmanger within kubernetes cluster. " +

Review comment:
       typo `taskmanger` -> `taskmanager`

##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -56,9 +58,27 @@
 	public static final ConfigOption<String> JOB_MANAGER_SERVICE_ACCOUNT =
 		key("kubernetes.jobmanager.service-account")
 		.stringType()
-		.defaultValue("default")
+		.noDefaultValue()
 		.withDescription("Service account that is used by jobmanager within kubernetes cluster. " +
-			"The job manager uses this service account when requesting taskmanager pods from the API server.");
+			"The job manager uses this service account when requesting taskmanager pods from the API server. " +
+			"If not explicitly configured, config option '" + KUBERNETES_SERVICE_ACCOUNT_KEY + "' will be used.");
+
+	public static final ConfigOption<String> TASK_MANAGER_SERVICE_ACCOUNT =
+		key("kubernetes.taskmanager.service-account")
+		.stringType()
+		.noDefaultValue()
+		.withDescription("Service account that is used by taskmanager within kubernetes cluster. " +
+			"The task manager uses this service account when watching config maps on the API server to retrieve " +
+			"leader address of jobmanager and resourcemanager. If not explicitly configured, config option '" +
+			KUBERNETES_SERVICE_ACCOUNT_KEY + "' will be used.");
+
+	public static final ConfigOption<String> KUBERNETES_SERVICE_ACCOUNT =
+		key(KUBERNETES_SERVICE_ACCOUNT_KEY)
+			.stringType()
+			.defaultValue("default")
+			.withDescription("Service account that is used by jobmanager and taskmanger within kubernetes cluster. " +
+				"Notice that this can be overwritten by config options '" + JOB_MANAGER_SERVICE_ACCOUNT.key() +
+				"' and '" + TASK_MANAGER_SERVICE_ACCOUNT.key() + "' for  jobmanager and taskmanager respectively.");

Review comment:
       ```suggestion
   				"' and '" + TASK_MANAGER_SERVICE_ACCOUNT.key() + "' for jobmanager and taskmanager respectively.");
   ```
   
   A useless space here.

##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecoratorTest.java
##########
@@ -187,6 +189,11 @@ public void testPodAnnotations() {
 		assertThat(resultAnnotations, is(equalTo(ANNOTATIONS)));
 	}
 
+	@Test
+	public void testPodServiceAccountName() {
+		assertThat(SERVICE_ACCOUNT_NAME, is(this.resultPod.getSpec().getServiceAccountName()));

Review comment:
       ```suggestion
   		assertThat(this.resultPod.getSpec().getServiceAccountName(), is(SERVICE_ACCOUNT_NAME));
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319",
       "triggerID" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308) 
   * b1b5c5016e4e38f895f0f0585662ba7150d2de74 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-750720765


   @blublinsky
   I think what @tillrohrmann and @wangyang0918 mean is to have a general config option *in addition to* the jm/tm specific options.
   
   There are three options in total:
   * `kubernetes.service-account`
   * `kubernetes.service-account.jobmanager`
   * `kubernetes.service-account.taskmanager`
   
   JM uses the account defined by `kubernetes.service-account.jobmanager`, and if that is not defined fallback to `kubernetes.service-account`.
   TM uses the account defined by `kubernetes.service-account.taskmanager`, and if that is not defined fallback to `kubernetes.service-account`.
   
   In this way, a user can choose to either define a common account for JM/TM via `kubernetes.service-account`, or separate accounts via `kubernetes.service-account.jobmanager` and `kubernetes.service-account.taskmanager`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751132231


   Introduced a common config option for service account and added unit tests


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11131",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11185",
       "triggerID" : "3d0478020b4ab99477c428d79c877bdb68911808",
       "triggerType" : "PUSH"
     }, {
       "hash" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192",
       "triggerID" : "42ac67bd1936e7ee7dc7201cb4598011495d524f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308",
       "triggerID" : "d07d1cc70e51f673ed01f8fde9d8102f00afe494",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319",
       "triggerID" : "b1b5c5016e4e38f895f0f0585662ba7150d2de74",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11321",
       "triggerID" : "1581e2c1364f86f8249a5df6b7c50e60dd0e3c41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 42ac67bd1936e7ee7dc7201cb4598011495d524f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11192) 
   * d07d1cc70e51f673ed01f8fde9d8102f00afe494 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11308) 
   * b1b5c5016e4e38f895f0f0585662ba7150d2de74 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11319) 
   * 1581e2c1364f86f8249a5df6b7c50e60dd0e3c41 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11321) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] xintongsong commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
xintongsong commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751162371


   > [FLINK-20359](https://github.com/apache/flink/pull/14281),
   > [FLINK-20324](https://github.com/apache/flink/pull/14284),
   > [FLINK-15649](https://github.com/apache/flink/pull/14283)
   
   I'm sure we can continue with the discussions and code reviews for these issues, in the corresponding JIRA tickets and pull requests.
   
   I also noticed that, for the three PRs, non of the corresponding JIRA tickets are assigned. I'd like to kindly remind that, the Apache Flink community suggests to reaching consensus on the approach and getting assigned to the ticket by a committer before start working on the implementation. Please take a close look at [How to Contribute Code](https://flink.apache.org/contributing/contribute-code.html).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751160248


   [FLINK-20359](https://github.com/apache/flink/pull/14281),
   [FLINK-20324](https://github.com/apache/flink/pull/14284),
   [FLINK-15649](https://github.com/apache/flink/pull/14283)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] blublinsky commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
blublinsky commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749583979


   Fixed requested. Not sure about Till's request


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749019176


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d07b609bb46ad9f2bf471dedc2476e62191f4273",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d07b609bb46ad9f2bf471dedc2476e62191f4273 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-751161546


   @blublinsky For FLINK-20359, I will have a look in this week. And the other two tickets, let's do the pod template first.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] wangyang0918 commented on pull request #14447: [FLINK-20664][k8s] Support setting service account for TaskManager pod.

Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on pull request #14447:
URL: https://github.com/apache/flink/pull/14447#issuecomment-749928782


   @blublinsky I think what till means is to introduce a common config option for service account. It could be `kubernetes.service-account`. It should only take effect when the jobmanager/taskmanager specific config option is not configured.
   
   Then the `KubernetesJobManagerParameters#getServiceAccount()` could be like following. Same is for `KubernetesTaskManagerParameters`.
   ```
   public String getServiceAccount() {
       return flinkConfig.getOptional(KubernetesConfigOptions.JOB_MANAGER_SERVICE_ACCOUNT)
   	.orElse(flinkConfig.getString(KubernetesConfigOptions.SERVICE_ACCOUNT));
   }
   ```
   
   Moreover, we need a test for such fallback logics.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org