feat: add labels support to StartContainerRequest and DockerRuntimeOrchestrator
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -140,7 +140,8 @@ public class DeploymentService {
|
|||||||
),
|
),
|
||||||
runtimeConfig.parseMemoryLimitBytes(),
|
runtimeConfig.parseMemoryLimitBytes(),
|
||||||
runtimeConfig.getContainerCpuShares(),
|
runtimeConfig.getContainerCpuShares(),
|
||||||
runtimeConfig.getAgentHealthPort()
|
runtimeConfig.getAgentHealthPort(),
|
||||||
|
Map.of()
|
||||||
));
|
));
|
||||||
|
|
||||||
deployment.setOrchestratorMetadata(Map.of("containerId", containerId));
|
deployment.setOrchestratorMetadata(Map.of("containerId", containerId));
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@@ -87,6 +88,7 @@ public class DockerRuntimeOrchestrator implements RuntimeOrchestrator {
|
|||||||
var container = dockerClient.createContainerCmd(request.imageRef())
|
var container = dockerClient.createContainerCmd(request.imageRef())
|
||||||
.withName(request.containerName())
|
.withName(request.containerName())
|
||||||
.withEnv(envList)
|
.withEnv(envList)
|
||||||
|
.withLabels(request.labels() != null ? request.labels() : Map.of())
|
||||||
.withHostConfig(hostConfig)
|
.withHostConfig(hostConfig)
|
||||||
.withHealthcheck(new HealthCheck()
|
.withHealthcheck(new HealthCheck()
|
||||||
.withTest(List.of("CMD-SHELL",
|
.withTest(List.of("CMD-SHELL",
|
||||||
|
|||||||
@@ -9,5 +9,6 @@ public record StartContainerRequest(
|
|||||||
Map<String, String> envVars,
|
Map<String, String> envVars,
|
||||||
long memoryLimitBytes,
|
long memoryLimitBytes,
|
||||||
int cpuShares,
|
int cpuShares,
|
||||||
int healthCheckPort
|
int healthCheckPort,
|
||||||
|
Map<String, String> labels
|
||||||
) {}
|
) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user