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:
[email protected]


With regards,
Apache Git Services

Reply via email to