From 6dbd4fde7f4fc2cfb09327d3f96d5ceb1d248c17 Mon Sep 17 00:00:00 2001 From: Marcin Antas Date: Sat, 16 May 2026 16:47:50 +0200 Subject: [PATCH] Add support for text2vec-digitalocean module --- .cicd/test.sh | 3 +++ weaviate/templates/_helpers.tpl | 3 +++ weaviate/templates/apiKeyDigitalOceanSecret.yaml | 12 ++++++++++++ weaviate/templates/weaviateStatefulset.yaml | 7 +++++++ weaviate/values.yaml | 14 ++++++++++++++ 5 files changed, 39 insertions(+) create mode 100644 weaviate/templates/apiKeyDigitalOceanSecret.yaml diff --git a/.cicd/test.sh b/.cicd/test.sh index afcbaea..b73ebfd 100755 --- a/.cicd/test.sh +++ b/.cicd/test.sh @@ -154,6 +154,8 @@ function check_creates_template() { check_modules "--set modules.reranker-jinaai.enabled=true --set modules.reranker-jinaai.apiKey=apiKey" "value: reranker-jinaai" check_modules "--set modules.text2vec-morph.enabled=true" "value: text2vec-morph" check_modules "--set modules.text2vec-morph.enabled=true --set modules.text2vec-morph.apiKey=apiKey" "value: text2vec-morph" + check_modules "--set modules.text2vec-digitalocean.enabled=true" "value: text2vec-digitalocean" + check_modules "--set modules.text2vec-digitalocean.enabled=true --set modules.text2vec-digitalocean.apiKey=apiKey" "value: text2vec-digitalocean" check_modules "--set modules.multi2vec-jinaai.enabled=true" "value: multi2vec-jinaai" check_modules "--set modules.multi2vec-jinaai.enabled=true --set modules.multi2vec-jinaai.apiKey=apiKey" "value: multi2vec-jinaai" check_modules "--set modules.multi2multivec-jinaai.enabled=true" "value: multi2multivec-jinaai" @@ -217,6 +219,7 @@ function check_creates_template() { check_modules "--set modules.reranker-contextualai.enabled=true --set modules.generative-contextualai.enabled=true" "value: generative-contextualai,reranker-contextualai" check_string_existence "--set modules.generative-xai.enabled=true --set modules.generative-xai.apiKey=apiKey" "name: XAI_APIKEY" check_string_existence "--set modules.text2vec-morph.enabled=true --set modules.text2vec-morph.apiKey=apiKey" "name: MORPH_APIKEY" + check_string_existence "--set modules.text2vec-digitalocean.enabled=true --set modules.text2vec-digitalocean.apiKey=apiKey" "name: DIGITALOCEAN_APIKEY" check_string_existence "--set modules.text2vec-openai.enabled=true --set modules.text2vec-openai.azureApiKey=azureApiKey" "name: AZURE_APIKEY" check_string_existence "--set modules.qna-openai.enabled=true --set modules.qna-openai.azureApiKey=azureApiKey" "name: AZURE_APIKEY" check_string_existence "--set modules.generative-openai.enabled=true --set modules.generative-openai.azureApiKey=azureApiKey" "name: AZURE_APIKEY" diff --git a/weaviate/templates/_helpers.tpl b/weaviate/templates/_helpers.tpl index 031048a..aa245c1 100644 --- a/weaviate/templates/_helpers.tpl +++ b/weaviate/templates/_helpers.tpl @@ -152,6 +152,9 @@ {{- if (index .Values "modules" "text2vec-morph" "enabled") -}} {{ $modules = append $modules "text2vec-morph" }} {{- end -}} + {{- if (index .Values "modules" "text2vec-digitalocean" "enabled") -}} + {{ $modules = append $modules "text2vec-digitalocean" }} + {{- end -}} {{- if (index .Values "modules" "ref2vec-centroid" "enabled") -}} {{ $modules = append $modules "ref2vec-centroid" }} {{- end -}} diff --git a/weaviate/templates/apiKeyDigitalOceanSecret.yaml b/weaviate/templates/apiKeyDigitalOceanSecret.yaml new file mode 100644 index 0000000..dcd1829 --- /dev/null +++ b/weaviate/templates/apiKeyDigitalOceanSecret.yaml @@ -0,0 +1,12 @@ +{{ if and (index .Values "modules" "text2vec-digitalocean" "enabled") (index .Values "modules" "text2vec-digitalocean" "apiKey") }} +apiVersion: v1 +kind: Secret +metadata: + name: weaviate-digitalocean + labels: + app.kubernetes.io/name: weaviate + app.kubernetes.io/managed-by: helm +type: Opaque +data: + apiKey: {{ index .Values "modules" "text2vec-digitalocean" "apiKey" | b64enc }} +{{ end }} diff --git a/weaviate/templates/weaviateStatefulset.yaml b/weaviate/templates/weaviateStatefulset.yaml index 117ef5a..742aae5 100644 --- a/weaviate/templates/weaviateStatefulset.yaml +++ b/weaviate/templates/weaviateStatefulset.yaml @@ -301,6 +301,13 @@ spec: name: weaviate-morph key: apiKey {{- end }} + {{- if and (index .Values "modules" "text2vec-digitalocean" "enabled") (index .Values "modules" "text2vec-digitalocean" "apiKey") }} + - name: DIGITALOCEAN_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-digitalocean + key: apiKey + {{- end }} {{- if and (index .Values "modules" "generative-friendliai" "enabled") (index .Values "modules" "generative-friendliai" "token") }} - name: FRIENDLI_TOKEN valueFrom: diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 01b70eb..a1bfe87 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -1291,6 +1291,20 @@ modules: # an environment variable apiKey: '' + # The text2vec-digitalocean module uses DigitalOcean Embeddings API + # to dynamically compute vector embeddings based on the + # sentence's context. + # More information about DigitalOcean Embeddings API can be found here: + # https://docs.digitalocean.com/products/gradient-ai-platform/ + text2vec-digitalocean: + + # enable if you want to use DigitalOcean module + enabled: false + + # Set your DigitalOcean API Key to be passed to Weaviate pod as + # an environment variable + apiKey: '' + # The multi2vec-clip modules uses CLIP transformers to vectorize both images # and text in the same vector space. It is typically slow(er) on CPUs and should # run with CUDA-enabled GPUs for optimal performance.