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:
[email protected]
With regards,
Apache Git Services