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 2022/08/05 08:57:52 UTC

[GitHub] [flink] bzhaoopenstack opened a new pull request, #20467: [WIP][FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

bzhaoopenstack opened a new pull request, #20467:
URL: https://github.com/apache/flink/pull/20467

   We introduce 3 options for supporting specify the K8S pod scheduler
   name.
   
   <!--
   *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
   
   *(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)*
   
   This change is introduced by FLIP-250 for supporting specify pod scheduler name by users. This PR introduces 3 options for it.
   
   ## Brief change log
   
   New options are:
   kubernetes.jobmanager.scheduler-name
   kubernetes.taskmanager.scheduler-name
   kubernetes.scheduler-name
   
   The first two of them can be specified by users to control the k8s pod
   scheduler they used for jobmanager and taskmanager. The last one is the
   fallback one, the first two options will overwrite it.
   
   ## Verifying this change
   
   Kubernetes deployment support 3 new options now. Can check the backend pods scheduler name whether is the same with the specified one.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (not applicable)
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] martin-g commented on a diff in pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by GitBox <gi...@apache.org>.
martin-g commented on code in PR #20467:
URL: https://github.com/apache/flink/pull/20467#discussion_r990934450


##########
docs/layouts/shortcodes/generated/kubernetes_config_configuration.html:
##########
@@ -206,6 +212,12 @@
             <td><p>Enum</p></td>
             <td>The exposed type of the rest service. The exposed rest service could be used to access the Flink’s Web UI and REST endpoint.<br /><br />Possible values:<ul><li>"ClusterIP"</li><li>"NodePort"</li><li>"LoadBalancer"</li><li>"Headless_ClusterIP"</li></ul></td>
         </tr>
+        <tr>
+            <td><h5>kubernetes.scheduler-name</h5></td>
+            <td style="word-wrap: break-word;">"default-scheduler"</td>
+            <td>String</td>
+            <td>Specify the kubernetes pod scheduler for Flink pods of deployment. The default value is using the kubernetes default pod scheduler. For customerized kubernetes pod scheduler, allow to set pod scheduler for customerized pod scheduling. Notice that this can be overwritten by config options 'kubernetes.jobmanager.scheduler-name' and 'kubernetes.taskmanager.scheduler-name' for jobmanager and taskmanager respectively.</td>

Review Comment:
   ```suggestion
               <td>The name of the Kubernetes pod scheduler for Flink pods of deployment. The default value is using the kubernetes default pod scheduler. Notice that this can be overwritten by config options 'kubernetes.jobmanager.scheduler-name' and 'kubernetes.taskmanager.scheduler-name' for JobManager and TaskManager respectively.</td>
   ```



##########
docs/layouts/shortcodes/generated/kubernetes_config_configuration.html:
##########
@@ -152,6 +152,12 @@
             <td>Integer</td>
             <td>Specify how many JobManager pods will be started simultaneously. Configure the value to greater than 1 to start standby JobManagers. It will help to achieve faster recovery. Notice that high availability should be enabled when starting standby JobManagers.</td>
         </tr>
+        <tr>
+            <td><h5>kubernetes.jobmanager.scheduler-name</h5></td>
+            <td style="word-wrap: break-word;">"default-scheduler"</td>
+            <td>String</td>
+            <td>Specify the kubernetes pod scheduler for jobmanager pods of deployment. The default value is using the kubernetes default pod scheduler. For customerized kubernetes pod scheduler, allow to set pod scheduler for customerized pod scheduling. If not explicitly configured, config option 'kubernetes.scheduler-name' will be used.</td>

Review Comment:
   ```suggestion
               <td>The name of the Kubernetes pod scheduler for JobManager pods. If not explicitly configured then config option 'kubernetes.scheduler-name' will be used.</td>
   ```



##########
docs/layouts/shortcodes/generated/kubernetes_config_configuration.html:
##########
@@ -260,6 +272,12 @@
             <td>Map</td>
             <td>The node selector to be set for TaskManager pods. Specified as key:value pairs separated by commas. For example, environment:production,disk:ssd.</td>
         </tr>
+        <tr>
+            <td><h5>kubernetes.taskmanager.scheduler-name</h5></td>
+            <td style="word-wrap: break-word;">"default-scheduler"</td>
+            <td>String</td>
+            <td>Specify the kubernetes pod scheduler for taskmanager pods of deployment. The default value is using the kubernetes default pod scheduler. For customerized kubernetes pod scheduler, allow to set pod scheduler for customerized pod scheduling. If not explicitly configured, config option 'kubernetes.scheduler-name' will be used.</td>

Review Comment:
   ```suggestion
               <td>The name of the Kubernetes pod scheduler for taskmanager pods. If not explicitly configured then config option 'kubernetes.scheduler-name' will be used.</td>
   ```



##########
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java:
##########
@@ -444,6 +445,46 @@ public class KubernetesConfigOptions {
 
     public static final ConfigOption<String> TASK_MANAGER_POD_TEMPLATE;
 
+    public static final ConfigOption<String> JOB_MANAGER_POD_SCHEDULER_NAME =
+            key("kubernetes.jobmanager.scheduler-name")
+                    .stringType()
+                    .defaultValue("default-scheduler")
+                    .withFallbackKeys(KUBERNETES_POD_SCHEDULER_NAME_KEY)
+                    .withDescription(
+                            "Specify the kubernetes pod scheduler for jobmanager pods of deployment. "

Review Comment:
   The description should be in sync with the documentation. That is, if my suggestions for the `.html` file are accepted then they should be applied here as well.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] flinkbot commented on pull request #20467: [WIP][FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "57f78e5b9e2c966351151d387fb82289f5e3640c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "57f78e5b9e2c966351151d387fb82289f5e3640c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 57f78e5b9e2c966351151d387fb82289f5e3640c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] gj199575 commented on pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by "gj199575 (via GitHub)" <gi...@apache.org>.
gj199575 commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-1441172829

   I will handle this PR as  @bzhaoopenstack  successor 。
   And there are two PR(https://github.com/apache/flink/pull/20498    https://github.com/apache/flink/pull/20636)  is  replenish of  this PR。
   
   And I also commit a PR as   replenish 。 https://github.com/bzhaoopenstack/flink/pull/5
   
   I wish more friends can give some advices。 Thanks.
   
   I wish we can  merge these PR, which can  help flink work on k8s better。


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] gj199575 commented on pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by GitBox <gi...@apache.org>.
gj199575 commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-1384771917

   I have a question.
    which mode the code  worked  for  ?
   flink on k8s session  、 flink on k8s per-job、 flink on k8s application or flink on k8s  native?
   thank you
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] bzhaoopenstack commented on a diff in pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by GitBox <gi...@apache.org>.
bzhaoopenstack commented on code in PR #20467:
URL: https://github.com/apache/flink/pull/20467#discussion_r990967711


##########
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java:
##########
@@ -444,6 +445,46 @@ public class KubernetesConfigOptions {
 
     public static final ConfigOption<String> TASK_MANAGER_POD_TEMPLATE;
 
+    public static final ConfigOption<String> JOB_MANAGER_POD_SCHEDULER_NAME =
+            key("kubernetes.jobmanager.scheduler-name")
+                    .stringType()
+                    .defaultValue("default-scheduler")
+                    .withFallbackKeys(KUBERNETES_POD_SCHEDULER_NAME_KEY)
+                    .withDescription(
+                            "Specify the kubernetes pod scheduler for jobmanager pods of deployment. "

Review Comment:
   Yeah, looks great.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options
URL: https://github.com/apache/flink/pull/20467


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] gj199575 commented on pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by GitBox <gi...@apache.org>.
gj199575 commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-1384771055

   I hava a question. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] Grypse commented on pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by GitBox <gi...@apache.org>.
Grypse commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-1208842402

   The scheduler can be setting with schedulerName in podTemplate simply,I think there is no need to add options to kubernetes config.
   
   `podTemplate:
         apiVersion: v1
         kind: Pod
         metadata:
           name: task-manager-pod-template
           namespace: flink-application-system
         spec:
           schedulerName: default-scheduler
   `


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] legendtkl commented on pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-1441155698

   Hi, @bzhaoopenstack , what is the status of this PR? Are you still working on it?
   
   Thanks.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-2592597810

   This PR is being marked as stale since it has not had any activity in the last 180 days. 
   If you would like to keep this PR alive, please leave a comment asking for a review. 
   If the PR has merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out to the 
   [community](https://flink.apache.org/what-is-flink/community/).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. 
   If no activity occurs in the next 90 days, it will be automatically closed.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-2768300449

   This PR has been closed since it has not had any activity in 120 days. 
   If you feel like this was a mistake, or you would like to continue working on it, 
   please feel free to re-open the PR and ask for a review.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] bzhaoopenstack commented on pull request #20467: [FLINK-28825][k8s] Add K8S pod scheduler into Kubernetes options

Posted by GitBox <gi...@apache.org>.
bzhaoopenstack commented on PR #20467:
URL: https://github.com/apache/flink/pull/20467#issuecomment-1221314501

   > podTemplate simply,I think there is no need to add options to kubernetes config.
   
   Hi, thanks for review. And apologize for my late reply. Yeah, that would be another easy way to set scheduler name via template. But we would also provide a way for users when they submit job via CLI, also for supporting plugin Step Decorators([K8S Custom Schedulers](https://issues.apache.org/jira/browse/FLINK-26559)), there would be many cases that users setting the schedulers more frequently or upper-level controller management platform.  So I think that would be valuable for introducing setting the said scheduler field via Configuration option. ;-)


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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