diff --git a/src/main/java/io/so1s/backend/domain/kubernetes/service/KubernetesServiceImpl.java b/src/main/java/io/so1s/backend/domain/kubernetes/service/KubernetesServiceImpl.java index 43959ddb..be58581f 100644 --- a/src/main/java/io/so1s/backend/domain/kubernetes/service/KubernetesServiceImpl.java +++ b/src/main/java/io/so1s/backend/domain/kubernetes/service/KubernetesServiceImpl.java @@ -211,6 +211,9 @@ public boolean deployInferenceServer( labels.put("app", "inference"); labels.put("name", deployName); + Map annotations = new HashMap<>(); + annotations.put("sidecar.istio.io/inject", "true"); + String host = deployment.getEndPoint().toLowerCase(); Deployment inferenceDeployment = new DeploymentBuilder() @@ -229,6 +232,7 @@ public boolean deployInferenceServer( .withNewMetadata() .withName(deployName) .addToLabels(labels) + .addToAnnotations(annotations) .endMetadata() .withNewSpec() .addNewContainer() @@ -256,7 +260,6 @@ public boolean deployInferenceServer( .endTemplate() .endSpec() .build(); - // See https://github.com/So1S/istio/blob/main/gateway.yaml io.fabric8.kubernetes.api.model.Service inferenceService = new ServiceBuilder()