Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .cicd/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@ function check_creates_template() {
check_setting_has_value "--set replicas=9 --set env.RAFT_METADATA_ONLY_VOTERS=true" "name: RAFT_METADATA_ONLY_VOTERS" "value: \"true\""
check_setting_has_value "--set replicas=3 --set env.RAFT_METADATA_ONLY_VOTERS=false" "name: RAFT_BOOTSTRAP_EXPECT" "value: \"3\""

_settingPassageQueryOn="--set modules.text2vec-contextionary.enabled=false --set modules.text2vec-transformers.passageQueryServices.passage.enabled=true --set modules.text2vec-transformers.passageQueryServices.query.enabled=true"
_settingPassageQueryOn="--namespace default --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"
check_setting_has_value "$_settingPassageQueryOn" "name: TRANSFORMERS_QUERY_INFERENCE_API" "value: http://transformers-inference-query.default.svc.cluster.local.:8080"
check_no_setting "$_settingPassageQueryOn" "name: TRANSFORMERS_INFERENCE_API"

_settingPassageQueryOff="--set modules.text2vec-contextionary.enabled=false --set modules.text2vec-transformers.enabled=true"
_settingPassageQueryOff="--namespace default --set modules.text2vec-contextionary.enabled=false --set modules.text2vec-transformers.enabled=true"
check_setting_has_value "$_settingPassageQueryOff" "name: TRANSFORMERS_INFERENCE_API" "value: http://transformers-inference.default.svc.cluster.local.:8080"
check_no_setting "$_settingPassageQueryOff" "name: TRANSFORMERS_PASSAGE_INFERENCE_API"
check_no_setting "$_settingPassageQueryOff" "name: TRANSFORMERS_QUERY_INFERENCE_API"
Expand Down Expand Up @@ -435,5 +435,17 @@ function check_creates_template() {
check_string_existence "--set readinessProbe.probeType=exec --set readinessProbe.probe.exec.command={test-probe-cmd}" "command:"
check_string_existence "--set readinessProbe.probeType=exec --set readinessProbe.probe.exec.command={test-probe-cmd}" "test-probe-cmd"

# Collection export tests
check_no_setting "" "name: EXPORT_ENABLED"
check_no_setting "" "name: EXPORT_DEFAULT_BUCKET"
check_no_setting "" "name: EXPORT_DEFAULT_PATH"
check_setting_has_value "--set collectionExport.enabled=true" "name: EXPORT_ENABLED" "value: \"true\""
check_setting_has_value "--set collectionExport.enabled=true" "name: EXPORT_DEFAULT_BUCKET" "value: \"weaviate-export\""
check_setting_has_value "--set collectionExport.enabled=true --set collectionExport.envconfig.EXPORT_DEFAULT_BUCKET=my-custom-bucket" "name: EXPORT_DEFAULT_BUCKET" "value: \"my-custom-bucket\""
check_setting_has_value "--set collectionExport.enabled=true" "name: EXPORT_DEFAULT_PATH" "value: \"\""
check_setting_has_value "--set collectionExport.enabled=true --set collectionExport.envconfig.EXPORT_DEFAULT_PATH=path/inside/bucket" "name: EXPORT_DEFAULT_PATH" "value: \"path/inside/bucket\""
check_no_setting "--set collectionExport.enabled=true" "name: EXPORT_PARALLELISM"
check_setting_has_value "--set collectionExport.enabled=true --set collectionExport.envconfig.EXPORT_PARALLELISM=4" "name: EXPORT_PARALLELISM" "value: \"4\""

echo "Tests successful."
)
10 changes: 10 additions & 0 deletions weaviate/templates/weaviateStatefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,16 @@ spec:
value: "/mcp-config/mcp-config.yaml"
{{- end }}
{{- end }}
{{- if index .Values "collectionExport" "enabled" }}
- name: EXPORT_ENABLED
value: "true"
{{- if index .Values "collectionExport" "envconfig" }}
{{- range $key, $value := index .Values "collectionExport" "envconfig" }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
- name: CLUSTER_JOIN
value: {{ .Values.service.name }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
ports:
Expand Down
16 changes: 16 additions & 0 deletions weaviate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,22 @@ backups:
# AZURE_STORAGE_CONNECTION_STRING: name-of-the-k8s-secret-containing-connection-string


# Configure collection export
collectionExport:
enabled: false
envconfig:
# Configure bucket where exports should be saved, this setting is mandatory.
# The bucket must exist before enabling collection export, otherwise exports will fail.
EXPORT_DEFAULT_BUCKET: weaviate-export

# Required setting. Bucket path in which to save exports. Defaults to empty string.
# Set this option if you want to save exports to a given path inside the bucket. Must be a valid bucket path.
EXPORT_DEFAULT_PATH: ""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default we will be setting EXPORT_DEFAULT_PATH empty? shouldn't this be commented as EXPORT_PARALLELISM?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the env var is required now. I did try enabling the feature the other day without the env var set and it was faling with this error.
That's what Dirk mentioned by saying that the env var is now required, but it can be default to "". If we don't pass it like that, the cluster will error and won't enable the feature.


# Optional setting. Defaults to 0 (GOMAXPROCS at runtime).
# Set this option to control the number of concurrent scan workers per export.
# EXPORT_PARALLELISM: 0

# modules are extensions to Weaviate, they can be used to support various
# ML-models, but also other features unrelated to model inference.
# An inference/vectorizer module is not required, you can also run without any
Expand Down
Loading