Skip to content

Commit

Permalink
Merge pull request #186 from weaviate/grpc-service-changes
Browse files Browse the repository at this point in the history
Changed default K8s gRPC Service type to NodePort
  • Loading branch information
antas-marcin authored Nov 8, 2023
2 parents babb881 + c051da9 commit 405c949
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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
8 changes: 5 additions & 3 deletions weaviate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ 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: http
- name: grpc
protocol: TCP
port: 80
port: 50051
# Target port is going to be the same for every port
type: LoadBalancer
type: NodePort
loadBalancerSourceRanges: []
# optionally set cluster IP if you want to set a static IP
clusterIP:
Expand Down

0 comments on commit 405c949

Please sign in to comment.