fuchanghai commented on code in PR #15369:
URL: 
https://github.com/apache/dolphinscheduler/pull/15369#discussion_r1437354084


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java:
##########
@@ -112,11 +112,17 @@ public void buildK8sJob(K8sTaskMainParameters 
k8STaskMainParameters) {
         Map<String, Quantity> limitRes = new HashMap<>();
         limitRes.put(MEMORY, new Quantity(String.format("%s%s", limitPodMem, 
MI)));
         limitRes.put(CPU, new Quantity(String.valueOf(limitPodCpu)));
+
         Map<String, String> labelMap = k8STaskMainParameters.getLabelMap();
-        labelMap.put(LAYER_LABEL, LAYER_LABEL_VALUE);
-        labelMap.put(NAME_LABEL, k8sJobName);
+        Map<String, String> jobLabelMap = new HashMap<>();
+        jobLabelMap.put(LAYER_LABEL, LAYER_LABEL_VALUE);

Review Comment:
   hi @Gallardot  I suggest that the following statement be executed at the 
end, so that when the user customizes the same label name, the one in ds will 
prevail, because ds will need to perform other operations with this label in 
the future. WDYT?  cc @Radeity 
   ```
   jobLabelMap.put(LAYER_LABEL, LAYER_LABEL_VALUE);
   jobLabelMap.put(NAME_LABEL, k8sJobName);
   
   ```



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to