Skip to content

Commit b4e49ea

Browse files
Update service template (#222)
* Update service template * fix --------- Co-authored-by: Phil Chen <[email protected]>
1 parent 35b9deb commit b4e49ea

File tree

2 files changed

+113
-7
lines changed

2 files changed

+113
-7
lines changed

charts/llm-engine/templates/_helpers.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,21 +330,21 @@ volumeMounts:
330330
mountPath: /workspace/llm_engine/llm_engine/infra/gateways/resources/templates
331331
{{- if .Values.aws }}
332332
- name: config-volume
333-
mountPath: /home/user/.aws/config
333+
mountPath: /root/.aws/config
334334
subPath: config
335335
{{- end }}
336336
{{- if .Values.config.values }}
337337
- name: llm-engine-service-config-volume
338338
mountPath: /workspace/llm_engine/service_configs
339339
- name: infra-service-config-volume
340-
mountPath: /workspace/ml_infra_core/llm_engine.core/llm_engine.core/configs
340+
mountPath: /workspace/model-engine/model_engine_server/core/configs
341341
{{- end }}
342342
{{- end }}
343343

344344
{{- define "llmEngine.forwarderVolumeMounts" }}
345345
volumeMounts:
346346
- name: config-volume
347-
mountPath: /home/user/.aws/config
347+
mountPath: /root/.aws/config
348348
subPath: config
349349
- name: user-config
350350
mountPath: /workspace/user_config
@@ -354,7 +354,7 @@ volumeMounts:
354354
subPath: raw_data
355355
{{- if .Values.config.values }}
356356
- name: infra-service-config-volume
357-
mountPath: /workspace/ml_infra_core/llm_engine.core/llm_engine.core/configs
357+
mountPath: /workspace/model-engine/model_engine_server/core/configs
358358
{{- end }}
359359
{{- end }}
360360

charts/llm-engine/templates/service_template_config_map.yaml

Lines changed: 109 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ data:
180180
- ddtrace-run
181181
- run-service
182182
- --config
183-
- /workspace/server/model_engine_server/inference/configs/${FORWARDER_CONFIG_FILE_NAME}
183+
- /workspace/model-engine/model_engine_server/inference/configs/${FORWARDER_CONFIG_FILE_NAME}
184184
- --http
185185
- production_threads
186186
- --port
@@ -223,7 +223,7 @@ data:
223223
- -m
224224
- model_engine_server.inference.forwarding.http_forwarder
225225
- --config
226-
- /workspace/server/model_engine_server/inference/configs/service--http_forwarder.yaml
226+
- /workspace/model-engine/model_engine_server/inference/configs/service--http_forwarder.yaml
227227
- --port
228228
- "${FORWARDER_PORT}"
229229
- --num-workers
@@ -266,7 +266,7 @@ data:
266266
- ddtrace-run
267267
- run-service
268268
- --config
269-
- /workspace/server/model_engine_server/inference/configs/${FORWARDER_CONFIG_FILE_NAME}
269+
- /workspace/model-engine/model_engine_server/inference/configs/${FORWARDER_CONFIG_FILE_NAME}
270270
- --queue
271271
- "${QUEUE}"
272272
- --task-visibility
@@ -483,6 +483,62 @@ data:
483483
protocol: TCP
484484
name: http
485485
${NODE_PORT_DICT}
486+
virtual-service.yaml: |-
487+
apiVersion: networking.istio.io/v1alpha3
488+
kind: VirtualService
489+
metadata:
490+
name: ${RESOURCE_NAME}
491+
namespace: ${NAMESPACE}
492+
labels:
493+
user_id: ${OWNER}
494+
team: ${TEAM}
495+
product: ${PRODUCT}
496+
created_by: ${CREATED_BY}
497+
owner: ${OWNER}
498+
env: circleci
499+
managed-by: model-engine
500+
use_scale_launch_endpoint_network_policy: "true"
501+
tags.datadoghq.com/env: circleci
502+
tags.datadoghq.com/version: ${GIT_TAG}
503+
tags.datadoghq.com/service: ${ENDPOINT_NAME}
504+
endpoint_id: ${ENDPOINT_ID}
505+
endpoint_name: ${ENDPOINT_NAME}
506+
spec:
507+
hosts:
508+
- ${RESOURCE_NAME}.${DNS_HOST_DOMAIN}
509+
gateways:
510+
- default/internal-gateway
511+
http:
512+
- route:
513+
- destination:
514+
host: "${RESOURCE_NAME}.${NAMESPACE}.svc.cluster.local"
515+
port:
516+
number: 80
517+
destination-rule.yaml: |-
518+
apiVersion: networking.istio.io/v1beta1
519+
kind: DestinationRule
520+
metadata:
521+
name: ${RESOURCE_NAME}
522+
namespace: ${NAMESPACE}
523+
labels:
524+
user_id: ${OWNER}
525+
team: ${TEAM}
526+
product: ${PRODUCT}
527+
created_by: ${CREATED_BY}
528+
owner: ${OWNER}
529+
env: circleci
530+
managed-by: model-engine
531+
use_scale_launch_endpoint_network_policy: "true"
532+
tags.datadoghq.com/env: circleci
533+
tags.datadoghq.com/version: ${GIT_TAG}
534+
tags.datadoghq.com/service: ${ENDPOINT_NAME}
535+
endpoint_id: ${ENDPOINT_ID}
536+
endpoint_name: ${ENDPOINT_NAME}
537+
spec:
538+
host: "${RESOURCE_NAME}.${NAMESPACE}.svc.cluster.local"
539+
trafficPolicy:
540+
loadBalancer:
541+
simple: LEAST_REQUEST
486542
vertical-pod-autoscaler.yaml: |-
487543
apiVersion: "autoscaling.k8s.io/v1"
488544
kind: VerticalPodAutoscaler
@@ -742,3 +798,53 @@ data:
742798
command: ["/bin/sh", "-ec", "while : ; do sleep 30 ; done"]
743799
terminationGracePeriodSeconds: 0
744800
{{- end }}
801+
cron-trigger.yaml: |-
802+
apiVersion: batch/v1
803+
kind: CronJob
804+
metadata:
805+
name: ${NAME}
806+
labels:
807+
user_id: ${OWNER}
808+
team: ${TEAM}
809+
product: ${PRODUCT}
810+
created_by: ${CREATED_BY}
811+
owner: ${OWNER}
812+
launch_trigger_id: ${TRIGGER_ID}
813+
tags.datadoghq.com/service: ${TRIGGER_ID}
814+
spec:
815+
schedule: "${CRON_SCHEDULE}"
816+
successfulJobsHistoryLimit: 0
817+
failedJobsHistoryLimit: 0
818+
jobTemplate:
819+
spec:
820+
backoffLimit: 0
821+
activeDeadlineSeconds: ${BATCH_CURL_JOB_ACTIVE_DEADLINE_SECONDS}
822+
template:
823+
metadata:
824+
labels:
825+
user_id: ${OWNER}
826+
team: ${TEAM}
827+
product: ${PRODUCT}
828+
created_by: ${CREATED_BY}
829+
owner: ${OWNER}
830+
launch_trigger_id: ${TRIGGER_ID}
831+
tags.datadoghq.com/service: ${TRIGGER_ID}
832+
spec:
833+
containers:
834+
- name: ${NAME}
835+
image: curlimages/curl:7.72.0
836+
imagePullPolicy: IfNotPresent
837+
command:
838+
- curl
839+
- -X
840+
- 'POST'
841+
- '${HOST}/v1/docker-image-batch-jobs'
842+
- -H
843+
- 'accept: application/json'
844+
- -H
845+
- 'Content-Type: application/json'
846+
- -d
847+
- '{ "docker_image_batch_job_bundle_id": "${DOCKER_IMAGE_BATCH_JOB_BUNDLE_ID}", "job_config": ${JOB_CONFIG}, "labels": ${JOB_METADATA} }'
848+
- -u
849+
- '${OWNER}:'
850+
restartPolicy: Never

0 commit comments

Comments
 (0)