From 0aca46ce35a8e2a92c8fbbdbcb112dae20af0954 Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Wed, 4 Dec 2024 11:56:58 -0800 Subject: [PATCH 1/2] helm: support adding labels to models --- charts/models/templates/models.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/models/templates/models.yaml b/charts/models/templates/models.yaml index b57067f0..c6ca28da 100644 --- a/charts/models/templates/models.yaml +++ b/charts/models/templates/models.yaml @@ -5,6 +5,10 @@ apiVersion: kubeai.org/v1 kind: Model metadata: name: {{ $name }} + {{- with $model.labels }} + labels: + {{- toYaml . | nindent 4 }} + {{- end }} spec: features: {{ $model.features }} {{- with $model.owner }} From 59e3b69eb1d90a602cf24bb7801434cdbaf46221 Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Wed, 4 Dec 2024 12:06:45 -0800 Subject: [PATCH 2/2] add docs on labels --- charts/models/values.yaml | 3 +++ docs/how-to/architect-for-multitenancy.md | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/charts/models/values.yaml b/charts/models/values.yaml index f83c86f4..4c1b18e9 100644 --- a/charts/models/values.yaml +++ b/charts/models/values.yaml @@ -4,6 +4,9 @@ all: catalog: llama-3.2-11b-vision-instruct-l4: + # You can optionally add metadata.labels. + # labels: + # tenancy: public enabled: false features: [TextGeneration] url: hf://neuralmagic/Llama-3.2-11B-Vision-Instruct-FP8-dynamic diff --git a/docs/how-to/architect-for-multitenancy.md b/docs/how-to/architect-for-multitenancy.md index ea25c7d3..0999573c 100644 --- a/docs/how-to/architect-for-multitenancy.md +++ b/docs/how-to/architect-for-multitenancy.md @@ -22,6 +22,15 @@ spec: # ... ``` +Example Model using Helm chart: +```yaml +catalog: + llama-3.2: + labels: + tenancy: public + # ... +``` + Example HTTP requests: ```bash