|
|
@ -112,11 +112,17 @@ public class K8sTaskExecutor extends AbstractK8sTaskExecutor { |
|
|
|
Map<String, Quantity> limitRes = new HashMap<>(); |
|
|
|
Map<String, Quantity> limitRes = new HashMap<>(); |
|
|
|
limitRes.put(MEMORY, new Quantity(String.format("%s%s", limitPodMem, MI))); |
|
|
|
limitRes.put(MEMORY, new Quantity(String.format("%s%s", limitPodMem, MI))); |
|
|
|
limitRes.put(CPU, new Quantity(String.valueOf(limitPodCpu))); |
|
|
|
limitRes.put(CPU, new Quantity(String.valueOf(limitPodCpu))); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> labelMap = k8STaskMainParameters.getLabelMap(); |
|
|
|
Map<String, String> labelMap = k8STaskMainParameters.getLabelMap(); |
|
|
|
labelMap.put(LAYER_LABEL, LAYER_LABEL_VALUE); |
|
|
|
Map<String, String> jobLabelMap = new HashMap<>(); |
|
|
|
labelMap.put(NAME_LABEL, k8sJobName); |
|
|
|
jobLabelMap.put(LAYER_LABEL, LAYER_LABEL_VALUE); |
|
|
|
|
|
|
|
jobLabelMap.put(NAME_LABEL, k8sJobName); |
|
|
|
|
|
|
|
jobLabelMap.putAll(labelMap); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> podLabelMap = new HashMap<>(); |
|
|
|
Map<String, String> podLabelMap = new HashMap<>(); |
|
|
|
podLabelMap.put(UNIQUE_LABEL_NAME, taskRequest.getTaskAppId()); |
|
|
|
podLabelMap.put(UNIQUE_LABEL_NAME, taskRequest.getTaskAppId()); |
|
|
|
|
|
|
|
podLabelMap.putAll(labelMap); |
|
|
|
|
|
|
|
|
|
|
|
EnvVar taskInstanceIdVar = new EnvVar(TASK_INSTANCE_ID, taskInstanceId, null); |
|
|
|
EnvVar taskInstanceIdVar = new EnvVar(TASK_INSTANCE_ID, taskInstanceId, null); |
|
|
|
List<EnvVar> envVars = new ArrayList<>(); |
|
|
|
List<EnvVar> envVars = new ArrayList<>(); |
|
|
|
envVars.add(taskInstanceIdVar); |
|
|
|
envVars.add(taskInstanceIdVar); |
|
|
@ -161,7 +167,7 @@ public class K8sTaskExecutor extends AbstractK8sTaskExecutor { |
|
|
|
.withApiVersion(API_VERSION) |
|
|
|
.withApiVersion(API_VERSION) |
|
|
|
.withNewMetadata() |
|
|
|
.withNewMetadata() |
|
|
|
.withName(k8sJobName) |
|
|
|
.withName(k8sJobName) |
|
|
|
.withLabels(labelMap) |
|
|
|
.withLabels(jobLabelMap) |
|
|
|
.withNamespace(namespaceName) |
|
|
|
.withNamespace(namespaceName) |
|
|
|
.endMetadata() |
|
|
|
.endMetadata() |
|
|
|
.withNewSpec() |
|
|
|
.withNewSpec() |
|
|
|