diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml new file mode 100644 index 0000000..9c5771b --- /dev/null +++ b/weaviate/templates/querierDeployment.yaml @@ -0,0 +1,457 @@ +{{ if .Values.experimental.querier.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: querier + labels: + name: querier + app: querier + app.kubernetes.io/name: querier + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + replicas: {{ .Values.experimental.querier.replicas }} + updateStrategy: +{{ toYaml .Values.updateStrategy | indent 4}} + selector: + matchLabels: + app: querier + template: + metadata: + labels: + app: querier + app.kubernetes.io/name: querier + spec: + securityContext: +{{ toYaml .Values.securityContext | indent 8}} + {{- if (index .Values "serviceAccountName") }} + serviceAccountName: {{ .Values.serviceAccountName }} + {{- else if and (index .Values "backups" "s3" "enabled") (index .Values "backups" "s3" "serviceAccountName") }} # for backwards compatibility + serviceAccountName: {{ .Values.backups.s3.serviceAccountName }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- include "image.pullSecrets" (dict "pullSecrets" $.Values.image.pullSecrets) | nindent 6 }} + {{- include "pod.priorityClassName" ( dict "global" $.Values.globalPriorityClassName "priorityClassName" .Values.priorityClassName) | nindent 6 }} + containers: + - name: querier + image: '{{ .Values.experimental.querier.image}}' + imagePullPolicy: {{ .Values.experimental.querier.pullPolicy }} + {{- with .Values.experimental.querier.command }} + command: {{ toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.experimental.querier.args }} + args: {{ toYaml . | nindent 10 }} + {{- end }} + resources: +{{ toYaml .Values.experimental.querier.resources | indent 10 }} + env: + {{- if or $.Values.experimental.querier.env $.Values.experimental.querier.envSecrets }} + {{- range $key, $value := $.Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- range $key, $secret := $.Values.experimental.querier.envSecrets }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key }} + {{- end }} + {{- end }} + - name: CLUSTER_BASIC_AUTH_USERNAME + valueFrom: + secretKeyRef: + name: weaviate-cluster-api-basic-auth + key: username + - name: CLUSTER_BASIC_AUTH_PASSWORD + valueFrom: + secretKeyRef: + name: weaviate-cluster-api-basic-auth + key: password + - name: PERSISTENCE_DATA_PATH + value: '/var/lib/weaviate' + - name: DEFAULT_VECTORIZER_MODULE + value: {{ index .Values "modules" "default_vectorizer_module" | trim }} + {{ template "enabled_modules" . }} + {{ template "raft_configuration" . }} + {{- if index .Values "modules" "text2vec-transformers" "enabled" }} + - name: TRANSFORMERS_INFERENCE_API + value: http://{{ index .Values "modules" "text2vec-transformers" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "text2vec-transformers" "inferenceUrl" }} + - name: TRANSFORMERS_INFERENCE_API + value: {{ index .Values "modules" "text2vec-transformers" "inferenceUrl" }} + {{- else }} + {{- if index .Values "modules" "text2vec-transformers" "passageQueryServices" "passage" "enabled" }} + - name: TRANSFORMERS_PASSAGE_INFERENCE_API + value: http://{{ index .Values "modules" "text2vec-transformers" "passageQueryServices" "passage" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "text2vec-transformers" "passageQueryServices" "passage" "inferenceUrl" }} + - name: TRANSFORMERS_PASSAGE_INFERENCE_API + value: {{ index .Values "modules" "text2vec-transformers" "passageQueryServices" "passage" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "text2vec-transformers" "passageQueryServices" "query" "enabled" }} + - name: TRANSFORMERS_QUERY_INFERENCE_API + value: http://{{ index .Values "modules" "text2vec-transformers" "passageQueryServices" "query" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "text2vec-transformers" "passageQueryServices" "query" "inferenceUrl" }} + - name: TRANSFORMERS_QUERY_INFERENCE_API + value: {{ index .Values "modules" "text2vec-transformers" "passageQueryServices" "query" "inferenceUrl" }} + {{- end }} + {{- end }} + {{- if index .Values "modules" "text2vec-gpt4all" "enabled" }} + - name: GPT4ALL_INFERENCE_API + value: http://{{ index .Values "modules" "text2vec-gpt4all" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "text2vec-gpt4all" "inferenceUrl" }} + - name: GPT4ALL_INFERENCE_API + value: {{ index .Values "modules" "text2vec-gpt4all" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "multi2vec-clip" "enabled" }} + - name: CLIP_INFERENCE_API + value: http://{{ index .Values "modules" "multi2vec-clip" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "multi2vec-clip" "inferenceUrl" }} + - name: CLIP_INFERENCE_API + value: {{ index .Values "modules" "multi2vec-clip" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "multi2vec-bind" "enabled" }} + - name: BIND_INFERENCE_API + value: http://{{ index .Values "modules" "multi2vec-bind" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "multi2vec-bind" "inferenceUrl" }} + - name: BIND_INFERENCE_API + value: {{ index .Values "modules" "multi2vec-bind" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "qna-transformers" "enabled" }} + - name: QNA_INFERENCE_API + value: http://{{ index .Values "modules" "qna-transformers" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "qna-transformers" "inferenceUrl" }} + - name: QNA_INFERENCE_API + value: {{ index .Values "modules" "qna-transformers" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "img2vec-neural" "enabled" }} + - name: IMAGE_INFERENCE_API + value: http://{{ index .Values "modules" "img2vec-neural" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "img2vec-neural" "inferenceUrl" }} + - name: IMAGE_INFERENCE_API + value: {{ index .Values "modules" "img2vec-neural" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "text-spellcheck" "enabled" }} + - name: SPELLCHECK_INFERENCE_API + value: http://{{ index .Values "modules" "text-spellcheck" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "text-spellcheck" "inferenceUrl" }} + - name: SPELLCHECK_INFERENCE_API + value: {{ index .Values "modules" "text-spellcheck" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "ner-transformers" "enabled" }} + - name: NER_INFERENCE_API + value: http://{{ index .Values "modules" "ner-transformers" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "ner-transformers" "inferenceUrl" }} + - name: NER_INFERENCE_API + value: {{ index .Values "modules" "ner-transformers" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "sum-transformers" "enabled" }} + - name: SUM_INFERENCE_API + value: http://{{ index .Values "modules" "sum-transformers" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "sum-transformers" "inferenceUrl" }} + - name: SUM_INFERENCE_API + value: {{ index .Values "modules" "sum-transformers" "inferenceUrl" }} + {{- end }} + {{- if index .Values "modules" "reranker-transformers" "enabled" }} + - name: RERANKER_INFERENCE_API + value: http://{{ index .Values "modules" "reranker-transformers" "fullnameOverride" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:8080 + {{- else if index .Values "modules" "reranker-transformers" "inferenceUrl" }} + - name: RERANKER_INFERENCE_API + value: {{ index .Values "modules" "reranker-transformers" "inferenceUrl" }} + {{- end }} + {{ if or (and (index .Values "modules" "text2vec-openai" "enabled") (index .Values "modules" "text2vec-openai" "apiKey")) (and (index .Values "modules" "qna-openai" "enabled") (index .Values "modules" "qna-openai" "apiKey")) (and (index .Values "modules" "generative-openai" "enabled") (index .Values "modules" "generative-openai" "apiKey")) }} + - name: OPENAI_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-openai + key: apiKey + {{- end }} + {{ if or (and (index .Values "modules" "text2vec-openai" "enabled") (index .Values "modules" "text2vec-openai" "azureApiKey")) (and (index .Values "modules" "qna-openai" "enabled") (index .Values "modules" "qna-openai" "azureApiKey")) (and (index .Values "modules" "generative-openai" "enabled") (index .Values "modules" "generative-openai" "azureApiKey")) }} + - name: AZURE_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-openai + key: apiKey + {{- end }} + {{- if and (index .Values "modules" "text2vec-huggingface" "enabled") (index .Values "modules" "text2vec-huggingface" "apiKey") }} + - name: HUGGINGFACE_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-huggingface + key: apiKey + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-cohere" "enabled") (index .Values "modules" "text2vec-cohere" "apiKey")) (and (index .Values "modules" "generative-cohere" "enabled") (index .Values "modules" "generative-cohere" "apiKey")) (and (index .Values "modules" "reranker-cohere" "enabled") (index .Values "modules" "reranker-cohere" "apiKey")) }} + - name: COHERE_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-cohere + key: apiKey + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-palm" "enabled") (index .Values "modules" "text2vec-palm" "apiKey")) (and (index .Values "modules" "generative-palm" "enabled") (index .Values "modules" "generative-palm" "apiKey")) (and (index .Values "modules" "multi2vec-palm" "enabled") (index .Values "modules" "multi2vec-palm" "apiKey")) }} + - name: PALM_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-palm + key: apiKey + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-jinaai" "enabled") (index .Values "modules" "text2vec-jinaai" "apiKey")) (and (index .Values "modules" "reranker-jinaai" "enabled") (index .Values "modules" "reranker-jinaai" "apiKey")) }} + - name: JINAAI_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-jinaai + key: apiKey + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-voyageai" "enabled") (index .Values "modules" "text2vec-voyageai" "apiKey")) (and (index .Values "modules" "reranker-voyageai" "enabled") (index .Values "modules" "reranker-voyageai" "apiKey")) }} + - name: VOYAGEAI_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-voyageai + key: apiKey + {{- end }} + {{- if and (index .Values "modules" "generative-anyscale" "enabled") (index .Values "modules" "generative-anyscale" "apiKey") }} + - name: ANYSCALE_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-anyscale + key: apiKey + {{- end }} + {{- if and (index .Values "modules" "generative-anthropic" "enabled") (index .Values "modules" "generative-anthropic" "apiKey") }} + - name: ANTHROPIC_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-anthropic + key: apiKey + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-mistral" "enabled") (index .Values "modules" "text2vec-mistral" "apiKey")) (and (index .Values "modules" "generative-mistral" "enabled") (index .Values "modules" "generative-mistral" "apiKey")) }} + - name: MISTRAL_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-mistral + key: apiKey + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-octoai" "enabled") (index .Values "modules" "text2vec-octoai" "apiKey")) (and (index .Values "modules" "generative-octoai" "enabled") (index .Values "modules" "generative-octoai" "apiKey")) }} + - name: OCTOAI_APIKEY + valueFrom: + secretKeyRef: + name: weaviate-octoai + key: apiKey + {{- end }} + {{- if and (index .Values "modules" "generative-friendliai" "enabled") (index .Values "modules" "generative-friendliai" "token") }} + - name: FRIENDLI_TOKEN + valueFrom: + secretKeyRef: + name: weaviate-friendliai + key: token + {{- end }} + {{- if or (and (index .Values "modules" "text2vec-databricks" "enabled") (index .Values "modules" "text2vec-databricks" "token")) (and (index .Values "modules" "generative-databricks" "enabled") (index .Values "modules" "generative-databricks" "token")) }} + - name: DATABRICKS_TOKEN + valueFrom: + secretKeyRef: + name: weaviate-databricks + key: token + {{- end }} + {{- if and (index .Values "offload" "s3" "enabled") (index .Values "offload" "s3" "envconfig") }} + {{- range $key, $value := index .Values "offload" "s3" "envconfig" }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if and (index .Values "backups" "filesystem" "enabled") (index .Values "backups" "filesystem" "envconfig") }} + {{- range $key, $value := index .Values "backups" "filesystem" "envconfig" }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if index .Values "backups" "s3" "enabled" }} + {{- if index .Values "backups" "s3" "envconfig" }} + {{- range $key, $value := index .Values "backups" "s3" "envconfig" }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- end }} + {{- if or (index .Values "offload" "s3" "enabled") (index .Values "backups" "s3" "enabled") (index .Values "modules" "text2vec-aws" "enabled") (index .Values "modules" "generative-aws" "enabled") }} + {{- if index .Values "offload" "s3" "envSecrets" }} + {{- range $key, $secret := $.Values.offload.s3.envSecrets }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key | quote }} + {{- end }} + {{- else if index .Values "backups" "s3" "envSecrets" }} + {{- range $key, $secret := $.Values.backups.s3.envSecrets }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key | quote }} + {{- end }} + {{- else if index .Values "modules" "text2vec-aws" "envSecrets" }} + {{- range $key, $secret := (index .Values "modules" "text2vec-aws" "envSecrets") }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key | quote }} + {{- end }} + {{- else if index .Values "modules" "generative-aws" "envSecrets" }} + {{- range $key, $secret := (index .Values "modules" "generative-aws" "envSecrets") }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key | quote }} + {{- end }} + {{- end }} + {{- if and (index .Values "backups" "s3" "secrets") (index .Values "backups" "s3" "secrets" "AWS_ACCESS_KEY_ID") }} + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: backup-s3 + key: AWS_ACCESS_KEY_ID + {{- else if or (and (index .Values "offload" "s3" "secrets") (index .Values "offload" "s3" "secrets" "AWS_ACCESS_KEY_ID")) (and (index .Values "modules" "text2vec-aws" "secrets") (index .Values "modules" "text2vec-aws" "secrets" "AWS_ACCESS_KEY_ID")) (and (index .Values "modules" "generative-aws" "secrets") (index .Values "modules" "generative-aws" "secrets" "AWS_ACCESS_KEY_ID")) }} + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: weaviate-aws + key: AWS_ACCESS_KEY_ID + {{- end }} + {{- if and (index .Values "backups" "s3" "secrets") (index .Values "backups" "s3" "secrets" "AWS_SECRET_ACCESS_KEY") }} + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + name: backup-s3 + key: AWS_SECRET_ACCESS_KEY + {{- else if or (and (index .Values "offload" "s3" "secrets") (index .Values "offload" "s3" "secrets" "AWS_SECRET_ACCESS_KEY")) (and (index .Values "modules" "text2vec-aws" "secrets") (index .Values "modules" "text2vec-aws" "secrets" "AWS_SECRET_ACCESS_KEY")) (and (index .Values "modules" "generative-aws" "secrets") (index .Values "modules" "generative-aws" "secrets" "AWS_SECRET_ACCESS_KEY")) }} + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + name: weaviate-aws + key: AWS_SECRET_ACCESS_KEY + {{- end }} + {{- end }} + {{- if index .Values "backups" "gcs" "enabled" }} + {{- if index .Values "backups" "gcs" "envconfig" }} + {{- range $key, $value := index .Values "backups" "gcs" "envconfig" }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if or (index .Values "backups" "gcs" "secrets") (index .Values "backups" "gcs" "envSecrets") }} + {{- if or (index .Values "backups" "gcs" "secrets" "GOOGLE_APPLICATION_CREDENTIALS") (index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS") }} + - name: GOOGLE_APPLICATION_CREDENTIALS + value: "/etc/gcp/credentials.json" + {{- end }} + {{- end }} + {{- end }} + {{- if index .Values "backups" "azure" "enabled" }} + {{- if index .Values "backups" "azure" "envconfig" }} + {{- range $key, $value := index .Values "backups" "azure" "envconfig" }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if index .Values "backups" "azure" "envSecrets" }} + {{- range $key, $secret := $.Values.backups.azure.envSecrets }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key | quote }} + {{- end }} + {{- end }} + {{- if and (index .Values "backups" "azure" "secrets") (index .Values "backups" "azure" "secrets" "AZURE_STORAGE_ACCOUNT") }} + - name: AZURE_STORAGE_ACCOUNT + valueFrom: + secretKeyRef: + name: backup-azure + key: AZURE_STORAGE_ACCOUNT + {{- end }} + {{- if and (index .Values "backups" "azure" "secrets") (index .Values "backups" "azure" "secrets" "AZURE_STORAGE_KEY") }} + - name: AZURE_STORAGE_KEY + valueFrom: + secretKeyRef: + name: backup-azure + key: AZURE_STORAGE_KEY + {{- end }} + {{- if and (index .Values "backups" "azure" "secrets") (index .Values "backups" "azure" "secrets" "AZURE_STORAGE_CONNECTION_STRING") }} + - name: AZURE_STORAGE_CONNECTION_STRING + valueFrom: + secretKeyRef: + name: backup-azure + key: AZURE_STORAGE_CONNECTION_STRING + {{- end }} + {{- end }} + - name: CLUSTER_JOIN + value: {{ .Values.service.name }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} + ports: + - containerPort: 8080 + {{- if .Values.env.PROMETHEUS_MONITORING_ENABLED }} + - name: metrics + containerPort: 2112 + protocol: TCP + {{- end }} + {{ if .Values.grpcService.enabled }} + - name: grpc + containerPort: 50051 + protocol: TCP + {{- end }} + volumeMounts: + - name: weaviate-config + mountPath: /weaviate-config + {{- if index .Values "backups" "gcs" "enabled" }} + {{- if or (index .Values "backups" "gcs" "secrets") (index .Values "backups" "gcs" "envSecrets") }} + {{- if or (index .Values "backups" "gcs" "secrets" "GOOGLE_APPLICATION_CREDENTIALS") (index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS") }} + - name: gcs-service-account-credentials-volume + mountPath: /etc/gcp + readOnly: true + {{- end }} + {{- end }} + {{- end }} + {{ with .Values.extraVolumeMounts }} + {{ toYaml . | nindent 10 }} + {{- end }} + securityContext: +{{ toYaml .Values.containerSecurityContext | indent 10}} + volumes: + - name: weaviate-config + configMap: + {{ if .Values.custom_config_map.enabled }}name: {{ .Values.custom_config_map.name }} {{ else }}name: weaviate-config{{ end }} + {{- if index .Values "backups" "gcs" "enabled" }} + {{- if and (index .Values "backups" "gcs" "secrets") (index .Values "backups" "gcs" "secrets" "GOOGLE_APPLICATION_CREDENTIALS") }} + - name: gcs-service-account-credentials-volume + secret: + secretName: backup-gcs + items: + - key: GOOGLE_APPLICATION_CREDENTIALS + path: credentials.json + {{- end }} + {{- if and (index .Values "backups" "gcs" "envSecrets") (index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS") }} + - name: gcs-service-account-credentials-volume + secret: + secretName: {{ index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS" }} + items: + - key: GOOGLE_APPLICATION_CREDENTIALS + path: credentials.json + {{- end }} + {{- end }} + {{ with .Values.extraVolumes }} + {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.hostAliases }} + hostAliases: + {{ toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/weaviate/templates/querierService.yaml b/weaviate/templates/querierService.yaml new file mode 100644 index 0000000..2bccc5d --- /dev/null +++ b/weaviate/templates/querierService.yaml @@ -0,0 +1,36 @@ +{{ if .Values.experimental.querier.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.experimental.querier.service.name }} + labels: + app.kubernetes.io/name: weaviate + app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if and .Values.env.PROMETHEUS_MONITORING_ENABLED .Values.serviceMonitor.enabled }} + monitoring: enabled +{{- end }} + {{- with .Values.experimental.querier.service.annotations }} + annotations: {{ toYaml . | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.experimental.querier.service.type }} + selector: + app: querier + ports: + {{- range .Values.experimental.querier.service.ports }} + - {{ toYaml . | indent 6 | trim }} + {{- end }} +{{ if eq .Values.experimental.querier.service.type "ClusterIP" -}} + {{ if .Values.experimental.querier.service.clusterIP }} + clusterIP: {{ .Values.experimental.querier.service.clusterIP }} + {{ end }} +{{ end }} +{{ if eq .Values.experimental.querier.service.type "LoadBalancer" -}} + {{- if gt (len .Values.experimental.querier.service.loadBalancerSourceRanges) 0 }} + loadBalancerSourceRanges: + {{- range $_, $sourceRange := .Values.experimental.querier.service.loadBalancerSourceRanges }} + - {{ $sourceRange }} + {{ end -}} + {{- end -}} +{{- end }} +{{- end }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 6bef767..6f78c3d 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -13,6 +13,56 @@ image: pullPolicy: IfNotPresent pullSecrets: [] +experimental: + querier: + enabled: false + replicas: 3 + image: semitechnologies/weaviate-experimental:preview-chore-change-default-configs-on-querier-23d39eb + storage_size: 10Gi + pullPolicy: IfNotPresent + command: ["/bin/weaviate"] + args: + - '--target=querier' + - '--query.schema.addr=http://weaviate' + - '--query.vectorize-addr=contextionary:9999' + - '--query.always-fetch-objectstore' + - '--monitoring.enabled' + - '--monitoring.port=2112' + - '--monitoring.metrics_namespace=weaviate' + + env: + - name: AWS_ACCESS_KEY + value: 'aws_access_key' + - name: AWS_SECRET_KEY + value: 'aws_secret_key' + - name: OFFLOAD_S3_ENDPOINT + value: 'http://minio:9000' + + resources: + requests: + cpu: '2' + memory: '500Mi' + limits: + cpu: '3' + memory: '1Gi' + + service: + name: querier + ports: + - name: grpc + protocol: TCP + port: 7071 + targetPort: 7071 + - name: http + protocol: TCP + port: 2112 # prometheus metrics + targetPort: 2112 + type: LoadBalancer + loadBalancerSourceRanges: [] + # optionally set cluster IP if you want to set a static IP + clusterIP: + annotations: {} + # overwrite command and args if you want to run specific startup scripts, for # example setting the nofile limit command: ["/bin/weaviate"] @@ -25,15 +75,15 @@ args: - 'http' - '--config-file' - '/weaviate-config/conf.yaml' - - --read-timeout=60s + - --read-timeout=60s - --write-timeout=60s # below is an example that can be used to set an arbitrary nofile limit at # startup: # -# command: +# command: # - "/bin/sh" -# args: +# args: # - "-c" # - "ulimit -n 65535 && /bin/weaviate --host 0.0.0.0 --port 8080 --scheme http --config-file /weaviate-config/conf.yaml" @@ -114,7 +164,7 @@ serviceAccountName: # Kubernetes Cluster domain name, used for resolving intra-cluster requests, i.e # between instances of weaviate. # Note: The final '.' on the end of the hostname makes it a FQDN, and is required for -# DNS to resolve in all kubernetes environments. +# DNS to resolve in all kubernetes environments. # See https://github.com/weaviate/weaviate-helm/issues/175 for details. clusterDomain: cluster.local. @@ -315,7 +365,7 @@ env: PROMETHEUS_MONITORING_ENABLED: false PROMETHEUS_MONITORING_GROUP: false - # Set a MEM limit for the Weaviate Pod so it can help you both increase GC-related + # Set a MEM limit for the Weaviate Pod so it can help you both increase GC-related # performance as well as avoid GC-related out-of-memory (“OOM”) situations # GOMEMLIMIT: 6GiB @@ -361,7 +411,7 @@ offload: # If one is using AWS EKS and has already configured K8s Service Account # that holds the AWS credentials one can pass a name of that service account # here using this setting. - # NOTE: the root `serviceAccountName` config has priority over this one, and + # NOTE: the root `serviceAccountName` config has priority over this one, and # if the root one is set this one will NOT overwrite it. This one is here for # backwards compatibility. serviceAccountName: @@ -370,7 +420,7 @@ offload: # Configure bucket where data should be saved, this setting is mandatory OFFLOAD_S3_BUCKET: weaviate-offload - # Optional setting. Defaults to AWS S3 (s3.amazonaws.com). + # Optional setting. Defaults to AWS S3 (s3.amazonaws.com). # Set this option if you have a MinIO storage configured in your environment # and want to use it instead of the AWS S3. # OFFLOAD_S3_ENDPOINT: custom.minio.endpoint.address @@ -383,7 +433,7 @@ offload: # Set this option if you wan't Weaviate to create # the bucket used for offloading tenants. Otherwise, # if set to false Weaviate expects the bucket to be - # already created with the OFFLOAD_S3_BUCKET name + # already created with the OFFLOAD_S3_BUCKET name # OFFLOAD_S3_BUCKET_AUTO_CREATE: true # You can pass environment AWS settings here: @@ -416,13 +466,13 @@ backups: envconfig: # Configure folder where backups should be saved BACKUP_FILESYSTEM_PATH: /tmp/backups - + s3: enabled: false # If one is using AWS EKS and has already configured K8s Service Account # that holds the AWS credentials one can pass a name of that service account # here using this setting. - # NOTE: the root `serviceAccountName` config has priority over this one, and + # NOTE: the root `serviceAccountName` config has priority over this one, and # if the root one is set this one will NOT overwrite it. This one is here for # backwards compatibility. serviceAccountName: @@ -431,17 +481,17 @@ backups: # Configure bucket where backups should be saved, this setting is mandatory BACKUP_S3_BUCKET: weaviate-backups - # Optional setting. Defaults to empty string. + # Optional setting. Defaults to empty string. # Set this option if you want to save backups to a given location # inside the bucket # BACKUP_S3_PATH: path/inside/bucket - # Optional setting. Defaults to AWS S3 (s3.amazonaws.com). + # Optional setting. Defaults to AWS S3 (s3.amazonaws.com). # Set this option if you have a MinIO storage configured in your environment # and want to use it instead of the AWS S3. # BACKUP_S3_ENDPOINT: custom.minio.endpoint.address - # Optional setting. Defaults to true. + # Optional setting. Defaults to true. # Set this option if you don't want to use SSL. # BACKUP_S3_USE_SSL: true @@ -454,7 +504,7 @@ backups: # You can pass the User credentials (access-key id and access-secret-key) in 2 ways: # 1. by setting the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY plain values in the `secrets` section below # this chart will create a kubernetes secret for you with these key-values pairs - # 2. create Kubernetes secret/s with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY keys and their respective values + # 2. create Kubernetes secret/s with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY keys and their respective values # Set the Key and the secret where it is set in `envSecrets` section below secrets: {} # AWS_ACCESS_KEY_ID: access-key-id (plain text) @@ -502,7 +552,7 @@ backups: # Configure container where backups should be saved, this setting is mandatory BACKUP_AZURE_CONTAINER: weaviate-backups - # Optional setting. Defaults to empty string. + # Optional setting. Defaults to empty string. # Set this option if you want to save backups to a given location # inside the container # BACKUP_AZURE_PATH: path/inside/container @@ -513,7 +563,7 @@ backups: # 1. by setting the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY # or AZURE_STORAGE_CONNECTION_STRING plain values in the `secrets` section below # this chart will create a kubernetes secret for you with these key-values pairs - # 2. create Kubernetes secret/s with AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY + # 2. create Kubernetes secret/s with AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY # or AZURE_STORAGE_CONNECTION_STRING and their respective values # Set the Key and the secret where it is set in `envSecrets` section below secrets: {} @@ -659,7 +709,7 @@ modules: # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ # applies to passageQueryService below securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -727,13 +777,13 @@ modules: # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ # applies to passageQueryService below securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. # NOTE: if not set the root `serviceAccountName` config will be used. serviceAccountName: - + # You can guide where the pods are scheduled on a per-module basis, # as well as for Weaviate overall. Each module accepts nodeSelector, # tolerations, and affinity configuration. If it is set on a per- @@ -796,7 +846,7 @@ modules: # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ # applies to passageQueryService below securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -817,7 +867,7 @@ modules: # These models run only on CPU only and on x86_64 arch # The ML model is containerized in a Weaviate compatible way. # If you want to run a different model that published ones you can follow the - # tutorial from here on how to create such a container: https://github.com/weaviate/t2v-gpt4all-models + # tutorial from here on how to create such a container: https://github.com/weaviate/t2v-gpt4all-models text2vec-gpt4all: # Enable deployment of this module @@ -826,7 +876,7 @@ modules: # You can set directly an inference URL of this module without deploying it with this release. # You can do so by setting a value for the `inferenceUrl` here AND by setting the `enable` to `false` inferenceUrl: {} - + # The configuration below is ignored if enabled==false tag: all-MiniLM-L6-v2 repo: semitechnologies/gpt4all-inference @@ -858,7 +908,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -1256,7 +1306,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -1490,7 +1540,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -1507,7 +1557,7 @@ modules: affinity: # The reranker-cohere module uses Cohere API - # to dynamically compute a score for the relevance + # to dynamically compute a score for the relevance # of the query with each of the initial search results. # More information about Cohere API can be found here: https://docs.cohere.com/docs/rerank-guide reranker-cohere: @@ -1520,7 +1570,7 @@ modules: apiKey: '' # The reranker-voyageai module uses VoaygeAI API - # to dynamically compute a score for the relevance + # to dynamically compute a score for the relevance # of the query with each of the initial search results. # More information about Cohere API can be found here: https://www.voyageai.com/ reranker-voyageai: @@ -1533,7 +1583,7 @@ modules: apiKey: '' # The reranker-jinaai module uses JinaAI API - # to dynamically compute a score for the relevance + # to dynamically compute a score for the relevance # of the query with each of the initial search results. # More information about Cohere API can be found here: https://jina.ai/reranker reranker-jinaai: @@ -1545,7 +1595,7 @@ modules: # an environment variable apiKey: '' - # The reranker-transformers module uses Cross-Encoders for + # The reranker-transformers module uses Cross-Encoders for # sentence pair scoring and sentence pair classification tasks. # More information about Cross-Encoders can be found here: # https://www.sbert.net/examples/applications/cross-encoder/README.html @@ -1603,7 +1653,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -1660,7 +1710,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -1734,7 +1784,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod. @@ -1805,7 +1855,7 @@ modules: # security Context for the Contextionary Pods. The configurations are the same as setting them # as described here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} - + # It is possible to add a ServiceAccount to this module's Pods, it can be # used in cases where the module is in a private registry and you want to # give access to the registry only to this pod.