Skip to content

Commit

Permalink
Updates to remove hacks and add default values file
Browse files Browse the repository at this point in the history
  • Loading branch information
ewkoch committed Nov 1, 2024
1 parent 21555e8 commit c681522
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 44 deletions.
8 changes: 2 additions & 6 deletions charts/model-engine/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,11 @@ env:
value: "true"
- name: LAUNCH_SERVICE_TEMPLATE_FOLDER
value: "/workspace/model-engine/model_engine_server/infra/gateways/resources/templates"
{{- if .Values.redis.auth}}
- name: REDIS_AUTH_TOKEN
value: {{ .Values.redis.auth }}
{{- end }}
{{- if .Values.redis.authSecret }}
{{- if .Values.secrets.kubernetesRedisSecretName }}
- name: REDIS_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.redis.authSecret }}
name: {{ .Values.secrets.kubernetesRedisSecretName }}
key: auth_token
{{- end }}
{{- if .Values.azure}}
Expand Down
6 changes: 3 additions & 3 deletions charts/model-engine/templates/inference_framework_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ metadata:
data:
deepspeed: "latest"
text_generation_inference: "latest"
vllm: "{{ .Values.vllmTag }}"
vllm_batch: "{{ .Values.vllmTag }}"
vllm_batch_v2: "{{ .Values.vllmTag }}"
vllm: "{{ .Values.vLLM.primaryTag }}"
vllm_batch: "{{ .Values.vLLM.batchTag }}"
vllm_batch_v2: "{{ .Values.vLLM.batchV2Tag }}"
lightllm: "latest"
tensorrt_llm: "latest"
4 changes: 2 additions & 2 deletions charts/model-engine/templates/istio-virtualservice.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- if .Values.virtualservice.enabled -}}
{{- if .values.virtualService.enabled -}}
{{- $fullName := include "modelEngine.fullname" . -}}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ $fullName }}
labels:
{{- include "modelEngine.labels" . | nindent 4 }}
{{- with .Values.virtualservice.annotations }}
{{- with .values.virtualService.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
25 changes: 25 additions & 0 deletions charts/model-engine/templates/service_account_inference.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if and (.Values.serviceTemplate) (.Values.serviceTemplate.createInferenceServiceAccount) (.Values.serviceTemplate.serviceAccountAnnotations) (.Values.serviceTemplate.serviceAccountName) (.Values.config.values.launch.endpoint_namespace)}}
{{- $annotations := .Values.serviceTemplate.serviceAccountAnnotations }}
{{- $inferenceServiceAccountName := .Values.serviceTemplate.serviceAccountName }}
{{- $inferenceServiceAccountNamespace := .Values.config.values.launch.endpoint_namespace }}
{{- $labels := include "modelEngine.labels" . }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{- printf " %s" $inferenceServiceAccountName }}
namespace: {{- printf " %s" $inferenceServiceAccountNamespace }}
labels:
{{- $labels | nindent 4 }}
{{- with $annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- if $.Values.azure }}
azure.workload.identity/client-id: {{ $.Values.azure.client_id }}
{{- end }}
{{- end }}
{{- if $.Values.azure }}
imagePullSecrets:
- name: egp-ecr-regcred
{{- end }}
---
{{- end }}
14 changes: 7 additions & 7 deletions charts/model-engine/templates/service_config_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ data:
sqs_queue_tag_template: |-
{
"infra.scale.com/product": "{{ .Values.productTag }}",
"infra.scale.com/team": "${team}",
"infra.scale.com/contact": "{{ .Values.contactEmail }}",
"infra.scale.com/customer": "AllCustomers",
"infra.scale.com/financialOwner": "{{ .Values.contactEmail}}",
"{{ .Values.tagging.organization }}/product": "{{ .Values.tagging.productTag }}",
"{{ .Values.tagging.organization }}/team": "${team}",
"{{ .Values.tagging.organization }}/contact": "{{ .Values.tagging.contactEmail }}",
"{{ .Values.tagging.organization }}/customer": "AllCustomers",
"{{ .Values.tagging.organization }}/financialOwner": "{{ .Values.tagging.contactEmail }}",
"Launch-Endpoint-Id": "${endpoint_id}",
"Launch-Endpoint-Name": "${endpoint_name}",
"Launch-Endpoint-Created-By": "${endpoint_created_by}"
Expand Down Expand Up @@ -101,8 +101,8 @@ data:
env: {{ .Values.context | quote }}
cloud_provider: "aws"
env: "prod"
k8s_cluster_name: "usgw1-prod"
dns_host_domain: "model-engine.ml-serving.{{ $.Values.global.networking.internalDomain }}"
k8s_cluster_name: "{{ .Values.clusterName }}"
dns_host_domain: "model-engine.{{ $.Values.global.networking.internalDomain }}"
default_region: "{{ .Values.aws.region }}"
ml_account_id: "{{ .Values.aws.accountId }}"
docker_repo_prefix: "{{ .Values.aws.accountId }}.dkr.ecr.{{ .Values.aws.region }}.amazonaws.com"
Expand Down
24 changes: 9 additions & 15 deletions charts/model-engine/templates/service_template_config_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,14 @@ data:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if eq $device "gpu" }}
# {{- if empty $node_selector }}
# nodeSelector:
# {{- end }}
# k8s.amazonaws.com/accelerator: ${GPU_TYPE}
{{- if empty $node_selector }}
nodeSelector:
{{- end }}
k8s.amazonaws.com/accelerator: ${GPU_TYPE}
tolerations:
- key: "nvidia.com/gpu"
operator: "Exists"
effect: "NoSchedule"
- key: "gpu_a100_multi"
operator: "Exists"
effect: "NoSchedule"
{{- end }}
priorityClassName: ${PRIORITY}
containers:
Expand Down Expand Up @@ -489,7 +486,7 @@ data:
protocol: TCP
name: http
${NODE_PORT_DICT}
{{- if .Values.virtualservice.enabled }}
{{- if .values.virtualService.enabled }}
virtual-service.yaml: |-
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
Expand Down Expand Up @@ -680,17 +677,14 @@ data:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if eq $device "gpu" }}
# {{- if empty $node_selector }}
# nodeSelector:
# {{- end }}
# k8s.amazonaws.com/accelerator: ${GPU_TYPE}
{{- if empty $node_selector }}
nodeSelector:
{{- end }}
k8s.amazonaws.com/accelerator: ${GPU_TYPE}
tolerations:
- key: "nvidia.com/gpu"
operator: "Exists"
effect: "NoSchedule"
- key: "gpu_a100_multi"
operator: "Exists"
effect: "NoSchedule"
{{- end }}
{{- if $service_template_service_account_name }}
serviceAccountName: {{ $service_template_service_account_name }}
Expand Down
Loading

0 comments on commit c681522

Please sign in to comment.