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


##########
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:
   We should keep user-defined labels higher priority. If it's conflict with 
some ds' future feature, we can add some check during task definition or throw 
run-time exception during task execution. Anyway, now it just behaves like 
identifier, like label `job-name` for pod which is auto-labeled by Kubernetes 
controller, current order is reasonable for me.



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