From 3e246c2521c20009afc6f6f148b497bcf84a52d8 Mon Sep 17 00:00:00 2001 From: hamish Date: Mon, 29 Sep 2025 17:49:06 +0100 Subject: [PATCH 1/2] service annotations, useful for tailscale etc. --- templates/service.yaml | 4 ++++ values.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/templates/service.yaml b/templates/service.yaml index 01711b6..f534097 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 429e985..0d8c27a 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 From 68491eed946264847090e190e2d8e464b727d433 Mon Sep 17 00:00:00 2001 From: hamish Date: Wed, 22 Oct 2025 13:31:49 +0100 Subject: [PATCH 2/2] onwards v1/models gives the model_name not alias --- templates/_helpers.tpl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 }}