Skip to content

Commit

Permalink
Add option to enable / disable gRPC support
Browse files Browse the repository at this point in the history
  • Loading branch information
antas-marcin committed Nov 8, 2023
1 parent 84195ec commit c051da9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cicd/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ function check_creates_template() {
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"
check_string_existence "--set grpcService.enabled=true" "containerPort: 50051"
check_string_existence "--set grpcService.enabled=true --set grpcService.name=weaviate-grpc-service-custom-name" "name: weaviate-grpc-service-custom-name"

_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"
Expand Down
2 changes: 2 additions & 0 deletions weaviate/templates/weaviateServiceGRPC.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.grpcService.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -30,3 +31,4 @@ spec:
{{ end -}}
{{- end -}}
{{- end }}
{{ end }}
2 changes: 2 additions & 0 deletions weaviate/templates/weaviateStatefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,11 @@ spec:
containerPort: 2112
protocol: TCP
{{- end }}
{{ if .Values.grpcService.enabled }}
- name: grpc
containerPort: 50051
protocol: TCP
{{- end }}
volumeMounts:
- name: weaviate-config
mountPath: /weaviate-config
Expand Down
2 changes: 2 additions & 0 deletions weaviate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ service:
# If you don't want a public load balancer, you can also choose 'ClusterIP' to make
# weaviate gRPC port be only accessible within your cluster.
grpcService:
# Set this to true in order to deploy Weaviate gRPC service
enabled: false
name: weaviate-grpc
ports:
- name: grpc
Expand Down

0 comments on commit c051da9

Please sign in to comment.