diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 1c97060..6c44812 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -84,15 +84,13 @@ Generate the config.json content for onwards {{- $targets := dict }} {{- range $groupName, $group := .Values.modelGroups }} {{- if $group.enabled }} -{{- range $alias := $group.modelAlias }} {{- $target := dict }} {{- $_ := set $target "url" (printf "http://%s-%s:%v" (include "inference-stack.fullname" $) $groupName $group.service.port) }} {{- if $group.apiKey }} {{- $_ := set $target "onwards_key" $group.apiKey }} {{- end }} -{{- $_ := set $target "onwards_model" ($group.modelName | default $alias) }} -{{- $_ := set $targets $alias $target }} -{{- end }} +{{- $_ := set $target "onwards_model" ($group.modelName | default $group.modelName) }} +{{- $_ := set $targets $group.modelName $target }} {{- end }} {{- end }} {{- $config := dict "targets" $targets }} diff --git a/templates/service.yaml b/templates/service.yaml index 2a2c622..9ad6bff 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -6,6 +6,10 @@ metadata: labels: {{- include "inference-stack.labels" . | nindent 4 }} app.kubernetes.io/component: onwards + {{- with .Values.onwards.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.onwards.service.type }} ports: diff --git a/values.yaml b/values.yaml index f68319a..5bea7ce 100644 --- a/values.yaml +++ b/values.yaml @@ -54,6 +54,7 @@ onwards: # External port for the service port: 80 # nodePort: 30080 # Only used if type is NodePort + annotations: {} # Port that the Onwards container listens on containerPort: 3000