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/03/23 10:04:21 UTC
[GitHub] [flink] wangyang0918 opened a new pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
wangyang0918 opened a new pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489
<!--
*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 Travis CI to do that following [this guide](https://flink.apache.org/contributing/contribute-code.html#open-a-pull-request).
- 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
Introduce config options to support to set labels and node-selector for JM/TM pods.
The [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) are key/value pairs that will be attached to the JM/TM pod.
The [node-selector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) is a collection of key/value pairs to constrain a pod to only be able to run on particular node(s).
## Brief change log
* Support to set labels
* Support to set node selector
## Verifying this change
* Unit tests
* Manually test in a real cluster
* Label a node with specified key/value `l1:v1,l2:v2`
* Using the config options `-Dkubernetes.jobmanager.node-selector=l1:v1,l2:v2 -Dkubernetes.taskmanager.node-selector=l1:v1,l2:v2` to make the pods only running the specified node
## 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/Mesos, 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? (docs)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9a71b6a999e564d76981346f79ecc625df4d1fcd Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154782742) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578)
* 496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8 UNKNOWN
* 5fc814200599cb0f4b8042b8d264e338c94ad2d3 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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 commented on issue #11489: [FLINK-15640][k8s]
Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-603592257
@zhengcanbin Thanks for your review. I have rebased on the master.
@TisonKun Could you please also have a look?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on issue #11489: [FLINK-15640][k8s]
Support to set labels and node-selector for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-603015969
Hi, @wangyang0918, this PR introduces two features, how about splitting it into two separate 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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r397055586
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -111,6 +112,34 @@
// The following config options could be overridden by KubernetesCliOptions.
// ---------------------------------------------------------------------------------
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_LABELS =
+ key("kubernetes.jobmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for JobManager pod. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> TASK_MANAGER_LABELS =
+ key("kubernetes.taskmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for TaskManager pods. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_NODE_SELECTOR =
+ key("kubernetes.jobmanager.node-selector")
Review comment:
I use singular for `node-selector` because in the K8s yaml file it is always singular. For `labels` and `annotations`, they are plural. So i am just trying to keep the same behavior with K8s document.
If you insist of changing it to `node-selectors`, i could update it.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396904991
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/parameters/KubernetesJobManagerParameters.java
##########
@@ -52,10 +54,16 @@ public KubernetesJobManagerParameters(Configuration flinkConfig, ClusterSpecific
@Override
public Map<String, String> getLabels() {
- Map<String, String> labels = getCommonLabels();
+ final Map<String, String> labels = new HashMap<>(getCommonLabels());
labels.put(Constants.LABEL_COMPONENT_KEY, Constants.LABEL_COMPONENT_JOB_MANAGER);
+ flinkConfig.getOptional(KubernetesConfigOptions.JOB_MANAGER_LABELS).ifPresent(labels::putAll);
Review comment:
According to the order, the users can override the built-in labels by customization. I think the built-in labels should prioritize the user-specified ones. WDYT?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bb02ce865fa48c9259500a8408897605534b35c2 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154569907) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524)
<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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396906973
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/parameters/KubernetesTaskManagerParameters.java
##########
@@ -59,7 +62,15 @@ public KubernetesTaskManagerParameters(
@Override
public Map<String, String> getLabels() {
- return KubernetesUtils.getTaskManagerLabels(getClusterId());
+ final Map<String, String> labels = new HashMap<>(KubernetesUtils.getTaskManagerLabels(getClusterId()));
+ flinkConfig.getOptional(KubernetesConfigOptions.TASK_MANAGER_LABELS).ifPresent(labels::putAll);
Review comment:
The same precedence problem?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396908960
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -111,6 +112,34 @@
// The following config options could be overridden by KubernetesCliOptions.
// ---------------------------------------------------------------------------------
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_LABELS =
+ key("kubernetes.jobmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for JobManager pod. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> TASK_MANAGER_LABELS =
+ key("kubernetes.taskmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for TaskManager pods. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_NODE_SELECTOR =
+ key("kubernetes.jobmanager.node-selector")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The node selector to be set for JobManager pod. Specified as key:value pairs separated by " +
Review comment:
Use the plural?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-603235383
@zhengcanbin I have addressed your comments. Could you take a look at your convenience?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bb02ce865fa48c9259500a8408897605534b35c2 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154569907) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524)
* 9a71b6a999e564d76981346f79ecc625df4d1fcd 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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 commented on issue #11489: [FLINK-15640][k8s]
Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-603235383
@zhengcanbin I have addressed your comments. Could you take a look at your convenience?
@TisonKun Could you also have a final check and help to merge?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on issue #11489: [FLINK-15640][k8s]
Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-603586485
@wangyang0918 It would be good to rebase this PR on the latest master and resolve the merge conflicts.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r397067375
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -111,6 +112,34 @@
// The following config options could be overridden by KubernetesCliOptions.
// ---------------------------------------------------------------------------------
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_LABELS =
+ key("kubernetes.jobmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for JobManager pod. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> TASK_MANAGER_LABELS =
+ key("kubernetes.taskmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for TaskManager pods. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_NODE_SELECTOR =
+ key("kubernetes.jobmanager.node-selector")
Review comment:
> I use singular for `node-selector` because in the K8s yaml file it is always singular. For `labels` and `annotations`, they are plural. So i am just trying to keep the same behavior with K8s document.
> If you insist of changing it to `node-selectors`, i could update it.
Indeed, the K8s use the singular for node-selector. I think you are right, we'd better try our best to keep consistent with the K8s side.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 commented on issue #11489: [FLINK-15640][k8s]
Support to set labels and node-selector for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602502909
@TisonKun @zhengcanbin Do you mind to take a look this PR?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154971684",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6592",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8 UNKNOWN
* 5fc814200599cb0f4b8042b8d264e338c94ad2d3 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154971684) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6592)
<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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396907892
##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/ExternalServiceDecoratorTest.java
##########
@@ -75,6 +75,7 @@ public void testBuildAccompanyingKubernetesResources() throws IOException {
assertEquals(expectedServicePorts, restService.getSpec().getPorts());
expectedLabels.put(Constants.LABEL_COMPONENT_KEY, Constants.LABEL_COMPONENT_JOB_MANAGER);
+ expectedLabels.putAll(userLabels);
Review comment:
The same precedence problem.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 commented on issue #11489: [FLINK-15640][k8s]
Support to set labels and node-selector for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-603164717
@zhengcanbin Thanks for you review. I think your suggestion is on point. I will split this ticket into two separate ones.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot commented on issue #11489: [FLINK-15640][k8s]
Support to set labels and node-selector for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602498660
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 d61183919b562b016fbc677221b6946864996ca5 (Mon Mar 23 10:06:37 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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9a71b6a999e564d76981346f79ecc625df4d1fcd Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154782742) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578)
<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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396908960
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -111,6 +112,34 @@
// The following config options could be overridden by KubernetesCliOptions.
// ---------------------------------------------------------------------------------
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_LABELS =
+ key("kubernetes.jobmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for JobManager pod. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> TASK_MANAGER_LABELS =
+ key("kubernetes.taskmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for TaskManager pods. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_NODE_SELECTOR =
+ key("kubernetes.jobmanager.node-selector")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The node selector to be set for JobManager pod. Specified as key:value pairs separated by " +
Review comment:
Use the plural?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] TisonKun merged pull request #11489: [FLINK-15640][k8s]
Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
TisonKun merged pull request #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396907892
##########
File path: flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/ExternalServiceDecoratorTest.java
##########
@@ -75,6 +75,7 @@ public void testBuildAccompanyingKubernetesResources() throws IOException {
assertEquals(expectedServicePorts, restService.getSpec().getPorts());
expectedLabels.put(Constants.LABEL_COMPONENT_KEY, Constants.LABEL_COMPONENT_JOB_MANAGER);
+ expectedLabels.putAll(userLabels);
Review comment:
The same precedence problem.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9a71b6a999e564d76981346f79ecc625df4d1fcd Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154782742) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578)
<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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "PENDING",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bb02ce865fa48c9259500a8408897605534b35c2 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154569907) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524)
<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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "PENDING",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154971684",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6592",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9a71b6a999e564d76981346f79ecc625df4d1fcd Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154782742) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578)
* 496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8 UNKNOWN
* 5fc814200599cb0f4b8042b8d264e338c94ad2d3 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154971684) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6592)
<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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot commented on issue #11489: [FLINK-15640][k8s]
Support to set labels and node-selector for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bb02ce865fa48c9259500a8408897605534b35c2 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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "PENDING",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bb02ce865fa48c9259500a8408897605534b35c2 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154569907) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524)
* 9a71b6a999e564d76981346f79ecc625df4d1fcd Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154782742) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578)
<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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bb02ce865fa48c9259500a8408897605534b35c2 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154569907) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524)
<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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9a71b6a999e564d76981346f79ecc625df4d1fcd Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154782742) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578)
* 496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8 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
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602514343
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154569907",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "bb02ce865fa48c9259500a8408897605534b35c2",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6524",
"triggerID" : "bb02ce865fa48c9259500a8408897605534b35c2",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6578",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"status" : "DELETED",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154782742",
"triggerID" : "9a71b6a999e564d76981346f79ecc625df4d1fcd",
"triggerType" : "PUSH"
}, {
"hash" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/github/flink-ci/flink/builds/154971684",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
}, {
"hash" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6592",
"triggerID" : "5fc814200599cb0f4b8042b8d264e338c94ad2d3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 496e0c34c6cdc9c6a4b1bf6a72df71328c2580e8 UNKNOWN
* 5fc814200599cb0f4b8042b8d264e338c94ad2d3 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154971684) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6592)
<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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r397056047
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/parameters/KubernetesJobManagerParameters.java
##########
@@ -52,10 +54,16 @@ public KubernetesJobManagerParameters(Configuration flinkConfig, ClusterSpecific
@Override
public Map<String, String> getLabels() {
- Map<String, String> labels = getCommonLabels();
+ final Map<String, String> labels = new HashMap<>(getCommonLabels());
labels.put(Constants.LABEL_COMPONENT_KEY, Constants.LABEL_COMPONENT_JOB_MANAGER);
+ flinkConfig.getOptional(KubernetesConfigOptions.JOB_MANAGER_LABELS).ifPresent(labels::putAll);
Review comment:
I think you are right. I will prioritize the built-in labels.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] wangyang0918 edited a comment on issue #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
wangyang0918 edited a comment on issue #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#issuecomment-602502909
@TisonKun @zhengcanbin @tillrohrmann Just as what we have discussed in #10973, i keep the same config options habit by using map type.
Do you mind to take a look this PR?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [flink] zhengcanbin commented on a change in pull request #11489:
[FLINK-15640][k8s] Support to set labels and node-selector for jobmanager
and taskmanager pod
Posted by GitBox <gi...@apache.org>.
zhengcanbin commented on a change in pull request #11489: [FLINK-15640][k8s] Support to set labels and node-selector for jobmanager and taskmanager pod
URL: https://github.com/apache/flink/pull/11489#discussion_r396906346
##########
File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -111,6 +112,34 @@
// The following config options could be overridden by KubernetesCliOptions.
// ---------------------------------------------------------------------------------
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_LABELS =
+ key("kubernetes.jobmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for JobManager pod. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> TASK_MANAGER_LABELS =
+ key("kubernetes.taskmanager.labels")
+ .mapType()
+ .noDefaultValue()
+ .withDescription("The labels to be set for TaskManager pods. Specified as key:value pairs separated by commas. " +
+ "For example, version:alphav1,deploy:test.");
+
+ public static final ConfigOption<Map<String, String>> JOB_MANAGER_NODE_SELECTOR =
+ key("kubernetes.jobmanager.node-selector")
Review comment:
How about changing the key from `kubernetes.jobmanager.node-selector` to `kubernetes.jobmanager.node-selectors`? We use the plural for the user-specified annotations and labels, in the meantime use the singular for the node-selector. Could we use a consistent key naming convention for these kind of config options?
----------------------------------------------------------------
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
With regards,
Apache Git Services