diff --git a/.cicd/test.sh b/.cicd/test.sh index c842b0f..e765a43 100755 --- a/.cicd/test.sh +++ b/.cicd/test.sh @@ -140,6 +140,7 @@ function check_creates_template() { check_modules "--set modules.text2vec-gpt4all.enabled=true --set modules.text-spellcheck.enabled=true" "value: text2vec-gpt4all,text-spellcheck" check_modules "--set modules.multi2vec-bind.enabled=true" "value: multi2vec-bind" check_modules "--set modules.multi2vec-bind.enabled=true --set modules.text-spellcheck.enabled=true" "value: text-spellcheck,multi2vec-bind" + check_modules "--set modules.text2vec-jinaai.enabled=true" "value: text2vec-jinaai" check_modules "--set modules.text2vec-openai.enabled=true --set modules.text2vec-openai.azureApiKey=azureApiKey" "value: text2vec-openai" check_modules "--set modules.qna-openai.enabled=true --set modules.qna-openai.azureApiKey=azureApiKey" "value: qna-openai" @@ -148,6 +149,7 @@ function check_creates_template() { 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" + check_string_existence "--set modules.text2vec-jinaai.enabled=true --set modules.text2vec-jinaai.apiKey=jinaaiApiKey" "name: JINAAI_APIKEY" _settingPassageQueryOn="--set modules.text2vec-contextionary.enabled=false --set modules.text2vec-transformers.passageQueryServices.passage.enabled=true --set modules.text2vec-transformers.passageQueryServices.query.enabled=true" check_setting_has_value "$_settingPassageQueryOn" "name: TRANSFORMERS_PASSAGE_INFERENCE_API" "value: http://transformers-inference-passage.default.svc.cluster.local:8080" diff --git a/weaviate/templates/_helpers.tpl b/weaviate/templates/_helpers.tpl index cf15c23..44caece 100644 --- a/weaviate/templates/_helpers.tpl +++ b/weaviate/templates/_helpers.tpl @@ -59,6 +59,9 @@ {{- if (index .Values "modules" "text2vec-palm" "enabled") -}} {{ $modules = append $modules "text2vec-palm" }} {{- end -}} + {{- if (index .Values "modules" "text2vec-jinaai" "enabled") -}} + {{ $modules = append $modules "text2vec-jinaai" }} + {{- end -}} {{- if (index .Values "modules" "ref2vec-centroid" "enabled") -}} {{ $modules = append $modules "ref2vec-centroid" }} {{- end -}} diff --git a/weaviate/templates/apiKeyJinaAISecret.yaml b/weaviate/templates/apiKeyJinaAISecret.yaml new file mode 100644 index 0000000..8d2992c --- /dev/null +++ b/weaviate/templates/apiKeyJinaAISecret.yaml @@ -0,0 +1,12 @@ +{{ if and (index .Values "modules" "text2vec-jinaai" "enabled") (index .Values "modules" "text2vec-jinaai" "apiKey") }} +apiVersion: v1 +kind: Secret +metadata: + name: weaviate-jinaai + labels: + app.kubernetes.io/name: weaviate + app.kubernetes.io/managed-by: helm +type: Opaque +data: + apiKey: {{ index .Values "modules" "text2vec-jinaai" "apiKey" | b64enc }} +{{ end }} diff --git a/weaviate/templates/weaviateStatefulset.yaml b/weaviate/templates/weaviateStatefulset.yaml index ac8045a..c4747b6 100644 --- a/weaviate/templates/weaviateStatefulset.yaml +++ b/weaviate/templates/weaviateStatefulset.yaml @@ -217,6 +217,13 @@ spec: name: weaviate-palm key: apiKey {{- end }} + {{- if and (index .Values "modules" "text2vec-jinaai" "enabled") (index .Values "modules" "text2vec-jinaai" "apiKey") }} + - name: JINAAI_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-jinaai + key: apiKey + {{- end }} {{- if and (index .Values "backups" "filesystem" "enabled") (index .Values "backups" "filesystem" "envconfig") }} {{- range $key, $value := index .Values "backups" "filesystem" "envconfig" }} - name: {{ $key }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index ad7e254..feb77c4 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -785,6 +785,20 @@ modules: # an environment variable apiKey: '' + # The text2vec-jinaai module uses JinaAI Embeddings API + # to dynamically compute vector embeddings based on the + # sentence's context. + # More information about JinaAI Embeddings API can be found here: + # https://jina.ai/embeddings + text2vec-jinaai: + + # enable if you want to use JinaAI module + enabled: false + + # Set your JinaAI API Key to be passed to Weaviate pod as + # an environment variable + apiKey: '' + # The ref2vec-centroid module ref2vec-centroid: