From cc206260a857335868eb4e725a8dd292b8266836 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 11:22:26 +0200 Subject: [PATCH 01/28] feat(querier): Support running `querier` component behind feature flag set `experimental.querier.enabled=true` Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 525 ++++++++++++++++++++++ weaviate/values.yaml | 92 ++-- 2 files changed, 584 insertions(+), 33 deletions(-) create mode 100644 weaviate/templates/querierDeployment.yaml diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml new file mode 100644 index 0000000..2ffd864 --- /dev/null +++ b/weaviate/templates/querierDeployment.yaml @@ -0,0 +1,525 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: querier + labels: + name: querier + app: querier + app.kubernetes.io/name: querier +spec: + replicas: {{ .Values.replicas }} + podManagementPolicy: {{ .Values.podManagementPolicy }} + updateStrategy: +{{ toYaml .Values.updateStrategy | indent 4}} + serviceName: {{ .Values.experimental.querier.service.name }}-headless + 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 }} + {{- if or (.Values.initContainers.sysctlInitContainer.enabled) (.Values.initContainers.extraInitContainers) }} + - name: configure-sysctl + securityContext: + runAsUser: 0 + privileged: true + image: "{{ .image.registry }}/{{ .image.repo }}:{{ .image.tag }}" + imagePullPolicy: "{{ .image.pullPolicy }}" + command: ["sysctl", "-w", "vm.max_map_count={{ .sysctlVmMaxMapCount }}", "vm.overcommit_memory=1"] + {{- end }} + {{- end }} + {{- if .Values.initContainers.ensureFileOwnershipContainer.enabled }} + {{- if and .Values.containerSecurityContext .Values.containerSecurityContext.runAsUser .Values.containerSecurityContext.fsGroup }} + - name: ensure-file-ownership + securityContext: + runAsUser: 0 + privileged: true + image: "{{ .Values.image.registry }}/{{ .Values.image.repo }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + command: ["chown", "-R", "{{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.containerSecurityContext.fsGroup }}", "/var/lib/weaviate"] + volumeMounts: + - name: querier-data + mountPath: /var/lib/weaviate + containers: + - name: querier + image: '{{ .Values.experimental.querier.image.registry }}' + imagePullPolicy: {{ .Values.experimental.querier.image.pullPolicy }} + {{- with .Values.experimental.querier.command }} + command: {{ toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.experimental.querier.args }} + args: {{ toYaml . | nindent 10 }} + {{- end }} + resources: +{{ toYaml .Values.resources | indent 10 }} + env: + {{- if or $.Values.env $.Values.envSecrets }} + {{- range $key, $value := $.Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- range $key, $secret := $.Values.envSecrets }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $secret }} + key: {{ $key | quote }} + {{- 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 + - name: querier-data + mountPath: /var/lib/weaviate + {{- 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 }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + {{- $probeType := .Values.startupProbe.probeType }} + {{- $probe := index .Values.startupProbe.probe $probeType }} + {{ $probeType }}: + {{- toYaml $probe | nindent 12 }} + initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.startupProbe.periodSeconds }} + failureThreshold: {{ .Values.startupProbe.failureThreshold }} + successThreshold: {{ .Values.startupProbe.successThreshold }} + timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} + {{- end }} + livenessProbe: + {{- $probeType := .Values.livenessProbe.probeType }} + {{- $probe := index .Values.livenessProbe.probe $probeType }} + {{ $probeType }}: + {{- toYaml $probe | nindent 12 }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + readinessProbe: + {{- $probeType := .Values.readinessProbe.probeType }} + {{- $probe := index .Values.readinessProbe.probe $probeType }} + {{ $probeType }}: + {{- toYaml $probe | nindent 12 }} + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + 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 }} + + volumeClaimTemplates: + - metadata: + name: querier-data + labels: + app.kubernetes.io/name: querier + app.kubernetes.io/managed-by: {{ .Release.Service }} + spec: + accessModes: [ "ReadWriteOnce" ] + storageClassName: {{ .Values.storage.storageClassName }} + resources: + requests: + storage: {{ .Values.storage.size }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 6bef767..dbcc74a 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -13,6 +13,32 @@ image: pullPolicy: IfNotPresent pullSecrets: [] +experimental: + querier: + enabled: true + querier_image: kavirajk/weaviate-exp:latest + pullPolicy: Always + command: ["/bin/weaviate"] + args: + - '--target' + - 'querier' + + service: + name: querier + ports: + - name: grpc + protocol: TCP + port: 9091 + - name: http + protocol: TCP + port: 8080 # prometheus metrics + # Target port is going to be the same for every port + 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 +51,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 +140,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 +341,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 +387,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 +396,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 +409,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 +442,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 +457,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 +480,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 +528,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 +539,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 +685,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 +753,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 +822,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 +843,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 +852,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 +884,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 +1282,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 +1516,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 +1533,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 +1546,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 +1559,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 +1571,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 +1629,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 +1686,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 +1760,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 +1831,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. From 39644cb6106005b82c6c3497a538fe346eb324df Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 13:20:41 +0200 Subject: [PATCH 02/28] fix some disk and volume claims Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 18 +++++------------- weaviate/values.yaml | 3 ++- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index 2ffd864..07c2948 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -1,3 +1,4 @@ +{{ if .Values.experimental.querier.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -483,6 +484,9 @@ spec: path: credentials.json {{- end }} {{- if and (index .Values "backups" "gcs" "envSecrets") (index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS") }} + - name: querier-data + emptyDir: + sizeLimit: {{ .Values.experimental.querier.storage_size }} - name: gcs-service-account-credentials-volume secret: secretName: {{ index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS" }} @@ -510,16 +514,4 @@ spec: hostAliases: {{ toYaml . | nindent 8 }} {{- end }} - - volumeClaimTemplates: - - metadata: - name: querier-data - labels: - app.kubernetes.io/name: querier - app.kubernetes.io/managed-by: {{ .Release.Service }} - spec: - accessModes: [ "ReadWriteOnce" ] - storageClassName: {{ .Values.storage.storageClassName }} - resources: - requests: - storage: {{ .Values.storage.size }} +{{ end }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index dbcc74a..fbb0e00 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -17,7 +17,8 @@ experimental: querier: enabled: true querier_image: kavirajk/weaviate-exp:latest - pullPolicy: Always + storage_size: 10Gi + pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) command: ["/bin/weaviate"] args: - '--target' From 20bc41e39331c0ea3291e807d7c62d56e7113c4f Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 14:50:09 +0200 Subject: [PATCH 03/28] fixing some template parser error Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 28 ++--------------------- weaviate/values.yaml | 2 +- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index 07c2948..36957d5 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -1,4 +1,3 @@ -{{ if .Values.experimental.querier.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -32,32 +31,10 @@ spec: 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 }} - {{- if or (.Values.initContainers.sysctlInitContainer.enabled) (.Values.initContainers.extraInitContainers) }} - - name: configure-sysctl - securityContext: - runAsUser: 0 - privileged: true - image: "{{ .image.registry }}/{{ .image.repo }}:{{ .image.tag }}" - imagePullPolicy: "{{ .image.pullPolicy }}" - command: ["sysctl", "-w", "vm.max_map_count={{ .sysctlVmMaxMapCount }}", "vm.overcommit_memory=1"] - {{- end }} - {{- end }} - {{- if .Values.initContainers.ensureFileOwnershipContainer.enabled }} - {{- if and .Values.containerSecurityContext .Values.containerSecurityContext.runAsUser .Values.containerSecurityContext.fsGroup }} - - name: ensure-file-ownership - securityContext: - runAsUser: 0 - privileged: true - image: "{{ .Values.image.registry }}/{{ .Values.image.repo }}:{{ .Values.image.tag }}" - imagePullPolicy: "{{ .Values.image.pullPolicy }}" - command: ["chown", "-R", "{{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.containerSecurityContext.fsGroup }}", "/var/lib/weaviate"] - volumeMounts: - - name: querier-data - mountPath: /var/lib/weaviate containers: - name: querier - image: '{{ .Values.experimental.querier.image.registry }}' - imagePullPolicy: {{ .Values.experimental.querier.image.pullPolicy }} + image: '{{ .Values.experimental.querier.image}}' + imagePullPolicy: {{ .Values.experimental.querier.pullPolicy }} {{- with .Values.experimental.querier.command }} command: {{ toYaml . | nindent 10 }} {{- end }} @@ -514,4 +491,3 @@ spec: hostAliases: {{ toYaml . | nindent 8 }} {{- end }} -{{ end }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index fbb0e00..348e409 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -16,7 +16,7 @@ image: experimental: querier: enabled: true - querier_image: kavirajk/weaviate-exp:latest + image: kavirajk/weaviate-exp:latest storage_size: 10Gi pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) command: ["/bin/weaviate"] From aacc05b5fe47ee6546c26a5835dcd735a6f1d90a Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 15:14:41 +0200 Subject: [PATCH 04/28] remove querier-data Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 6 ---- weaviate/templates/querierService.yaml | 35 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 weaviate/templates/querierService.yaml diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index 36957d5..3118472 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -8,7 +8,6 @@ metadata: app.kubernetes.io/name: querier spec: replicas: {{ .Values.replicas }} - podManagementPolicy: {{ .Values.podManagementPolicy }} updateStrategy: {{ toYaml .Values.updateStrategy | indent 4}} serviceName: {{ .Values.experimental.querier.service.name }}-headless @@ -399,8 +398,6 @@ spec: volumeMounts: - name: weaviate-config mountPath: /weaviate-config - - name: querier-data - mountPath: /var/lib/weaviate {{- 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") }} @@ -461,9 +458,6 @@ spec: path: credentials.json {{- end }} {{- if and (index .Values "backups" "gcs" "envSecrets") (index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS") }} - - name: querier-data - emptyDir: - sizeLimit: {{ .Values.experimental.querier.storage_size }} - name: gcs-service-account-credentials-volume secret: secretName: {{ index .Values "backups" "gcs" "envSecrets" "GOOGLE_APPLICATION_CREDENTIALS" }} diff --git a/weaviate/templates/querierService.yaml b/weaviate/templates/querierService.yaml new file mode 100644 index 0000000..e1dd7c2 --- /dev/null +++ b/weaviate/templates/querierService.yaml @@ -0,0 +1,35 @@ +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 }} + targetPort: 8080 + {{- 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 }} From 6b1511fc8d7ce94cbe1c5c77aa824e575f8b4f3b Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 15:16:29 +0200 Subject: [PATCH 05/28] replace right image tag Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 348e409..927c879 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -16,7 +16,7 @@ image: experimental: querier: enabled: true - image: kavirajk/weaviate-exp:latest + image: semitechnologies/weaviate-experimental storage_size: 10Gi pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) command: ["/bin/weaviate"] From 290b9e8830ab2006961c2516447ba19dd6df5327 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 15:29:07 +0200 Subject: [PATCH 06/28] tweak image tag Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 927c879..e9ad369 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -16,7 +16,7 @@ image: experimental: querier: enabled: true - image: semitechnologies/weaviate-experimental + image: semitechnologies/weaviate-experimental:preview-chore-push-docker-support-serverless-experimental-image-push-ec74d48 storage_size: 10Gi pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) command: ["/bin/weaviate"] From 6f5c09acd204b82010a686edc71be109ffc741f4 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 15:42:20 +0200 Subject: [PATCH 07/28] remove the heath checks for querier Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 31 ----------------------- 1 file changed, 31 deletions(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index 3118472..55e7d84 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -411,37 +411,6 @@ spec: {{ toYaml . | nindent 10 }} {{- end }} {{- if .Values.startupProbe.enabled }} - startupProbe: - {{- $probeType := .Values.startupProbe.probeType }} - {{- $probe := index .Values.startupProbe.probe $probeType }} - {{ $probeType }}: - {{- toYaml $probe | nindent 12 }} - initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.startupProbe.periodSeconds }} - failureThreshold: {{ .Values.startupProbe.failureThreshold }} - successThreshold: {{ .Values.startupProbe.successThreshold }} - timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} - {{- end }} - livenessProbe: - {{- $probeType := .Values.livenessProbe.probeType }} - {{- $probe := index .Values.livenessProbe.probe $probeType }} - {{ $probeType }}: - {{- toYaml $probe | nindent 12 }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - readinessProbe: - {{- $probeType := .Values.readinessProbe.probeType }} - {{- $probe := index .Values.readinessProbe.probe $probeType }} - {{ $probeType }}: - {{- toYaml $probe | nindent 12 }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} securityContext: {{ toYaml .Values.containerSecurityContext | indent 10}} volumes: From 357694f6e90f84d2447816adb863c709e01889ae Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 14 Oct 2024 15:46:35 +0200 Subject: [PATCH 08/28] remove the template properly Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index 55e7d84..d4abc3a 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -410,7 +410,6 @@ spec: {{ with .Values.extraVolumeMounts }} {{ toYaml . | nindent 10 }} {{- end }} - {{- if .Values.startupProbe.enabled }} securityContext: {{ toYaml .Values.containerSecurityContext | indent 10}} volumes: From 2284d7ca80f3431f0d493c5436bbb21c196aa4fd Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 11:50:03 +0200 Subject: [PATCH 09/28] set the right configs for schema addr and minio dependencies Signed-off-by: Kaviraj --- weaviate/values.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index e9ad369..315098b 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -21,8 +21,8 @@ experimental: pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) command: ["/bin/weaviate"] args: - - '--target' - - 'querier' + - '--target=querier' + - '--query.schema.addr=http://weaviate.default.svc.cluster.local:80' service: name: querier @@ -384,7 +384,8 @@ envSecrets: # Configure offload providers offload: s3: - enabled: false + # TODO(kavi): Move the changes on this block to some kind of `values-overrides` file + enabled: true # 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. @@ -400,7 +401,7 @@ offload: # 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 + OFFLOAD_S3_ENDPOINT: http://minio.default.svc.cluster.local:9000 # Optional setting. Defaults to true. # Set this option if you don't want to use SSL. @@ -411,7 +412,7 @@ offload: # 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 - # OFFLOAD_S3_BUCKET_AUTO_CREATE: true + OFFLOAD_S3_BUCKET_AUTO_CREATE: true # You can pass environment AWS settings here: # Define the region @@ -424,15 +425,15 @@ offload: # 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 # Set the Key and the secret where it is set in `envSecrets` section below - secrets: {} - # AWS_ACCESS_KEY_ID: access-key-id (plain text) - # AWS_SECRET_ACCESS_KEY: secret-access-key (plain text) + secrets: + AWS_ACCESS_KEY: aws_access_key + AWS_SECRET_KEY: aws_secret_key # If one has already defined secrets with AWS credentials one can pass them using # this setting: - envSecrets: {} - # AWS_ACCESS_KEY_ID: name-of-the-k8s-secret-containing-the-key-id - # AWS_SECRET_ACCESS_KEY: name-of-the-k8s-secret-containing-the-key + envSecrets: + AWS_ACCESS_KEY: aws_access_key + AWS_SECRET_KEY: aws_secret_key # Configure backup providers backups: From 46e27212ebb837c83c3899525468683d7839abfa Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 13:28:35 +0200 Subject: [PATCH 10/28] fix some envs and args Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 6 +++--- weaviate/values.yaml | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index d4abc3a..e959cd8 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -43,17 +43,17 @@ spec: resources: {{ toYaml .Values.resources | indent 10 }} env: - {{- if or $.Values.env $.Values.envSecrets }} + {{- 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.envSecrets }} + {{- range $key, $secret := $.Values.experimental.querier.envSecrets }} - name: {{ $key }} valueFrom: secretKeyRef: name: {{ $secret }} - key: {{ $key | quote }} + key: {{ $key }} {{- end }} {{- end }} - name: CLUSTER_BASIC_AUTH_USERNAME diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 315098b..6a2061d 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -23,6 +23,13 @@ experimental: args: - '--target=querier' - '--query.schema.addr=http://weaviate.default.svc.cluster.local:80' + env: + - name: AWS_ACCESS_KEY + value: 'aws_access_key' + - name: AWS_SECRET_KEY + value: 'aws_secret_key' + - name: OFFLOAD_S3_ENDPOINT + value: 'http://minio.default.svc.cluster.local:9000' service: name: querier @@ -425,15 +432,15 @@ offload: # 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 # Set the Key and the secret where it is set in `envSecrets` section below - secrets: - AWS_ACCESS_KEY: aws_access_key - AWS_SECRET_KEY: aws_secret_key + secrets: {} + # AWS_ACCESS_KEY_ID: access-key-id (plain text) + # AWS_SECRET_ACCESS_KEY: secret-access-key (plain text) # If one has already defined secrets with AWS credentials one can pass them using # this setting: - envSecrets: - AWS_ACCESS_KEY: aws_access_key - AWS_SECRET_KEY: aws_secret_key + envSecrets: {} + # AWS_ACCESS_KEY_ID: name-of-the-k8s-secret-containing-the-key-id + # AWS_SECRET_ACCESS_KEY: name-of-the-k8s-secret-containing-the-key # Configure backup providers backups: From 675b55d122df4d89b22405a9a2116465e69878b7 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 13:42:42 +0200 Subject: [PATCH 11/28] Add metrics configs by default Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 6a2061d..dc11775 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -23,6 +23,8 @@ experimental: args: - '--target=querier' - '--query.schema.addr=http://weaviate.default.svc.cluster.local:80' + - '--monitoring.enabled=true' + - '--monitoring.metrics_namespace=weaviate' env: - name: AWS_ACCESS_KEY value: 'aws_access_key' From 2bbcae74b5b86bff07bff9c9528b41f672f165ec Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 13:46:48 +0200 Subject: [PATCH 12/28] fix bool argument Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index dc11775..e8d859f 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -23,7 +23,7 @@ experimental: args: - '--target=querier' - '--query.schema.addr=http://weaviate.default.svc.cluster.local:80' - - '--monitoring.enabled=true' + - '--monitoring.enabled' - '--monitoring.metrics_namespace=weaviate' env: - name: AWS_ACCESS_KEY From fdf50f745df13920fe3af4ce49a86f66fb8dde19 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 14:07:27 +0200 Subject: [PATCH 13/28] map different ports to work with core weaviate helm chart Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index e8d859f..e70a0cd 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -22,9 +22,11 @@ experimental: command: ["/bin/weaviate"] args: - '--target=querier' + - '--query.grpc.listen=0.0.0.0:7071' - '--query.schema.addr=http://weaviate.default.svc.cluster.local:80' - '--monitoring.enabled' - '--monitoring.metrics_namespace=weaviate' + - '--monitoring.port=7072' env: - name: AWS_ACCESS_KEY value: 'aws_access_key' From b995741020d8aa22a7609fb9c5c5995e91edbbd1 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 14:58:12 +0200 Subject: [PATCH 14/28] remap ports on service Signed-off-by: Kaviraj --- weaviate/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index e70a0cd..cf79950 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -40,10 +40,10 @@ experimental: ports: - name: grpc protocol: TCP - port: 9091 + port: 7071 - name: http protocol: TCP - port: 8080 # prometheus metrics + port: 7072 # prometheus metrics # Target port is going to be the same for every port type: LoadBalancer loadBalancerSourceRanges: [] From 4187d980ddf2a96e67b86e6f652fa66ee96b1f9d Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 15:09:00 +0200 Subject: [PATCH 15/28] fix targetPort for querier service Signed-off-by: Kaviraj --- weaviate/templates/querierService.yaml | 1 - weaviate/values.yaml | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weaviate/templates/querierService.yaml b/weaviate/templates/querierService.yaml index e1dd7c2..1f7bbbe 100644 --- a/weaviate/templates/querierService.yaml +++ b/weaviate/templates/querierService.yaml @@ -18,7 +18,6 @@ spec: ports: {{- range .Values.experimental.querier.service.ports }} - {{ toYaml . | indent 6 | trim }} - targetPort: 8080 {{- end }} {{ if eq .Values.experimental.querier.service.type "ClusterIP" -}} {{ if .Values.experimental.querier.service.clusterIP }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index cf79950..33f46e3 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -41,10 +41,11 @@ experimental: - name: grpc protocol: TCP port: 7071 + targetPort: 7071 - name: http protocol: TCP port: 7072 # prometheus metrics - # Target port is going to be the same for every port + targetPort: 7072 type: LoadBalancer loadBalancerSourceRanges: [] # optionally set cluster IP if you want to set a static IP From c6ddd85fd88b71b21d553081492a2e60532bec68 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 15:22:02 +0200 Subject: [PATCH 16/28] hack: contextionary module enable and make it default Signed-off-by: Kaviraj --- weaviate/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 33f46e3..5dfffa0 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -582,7 +582,7 @@ modules: text2vec-contextionary: # Enable deployment of this module - enabled: false + enabled: true # The configuration below is ignored if enabled==false fullnameOverride: contextionary @@ -1865,7 +1865,7 @@ modules: # use this module as the vectorizer if nothing else is specified. Can be # overwritten on a per-class basis. # set to text2vec-transformers if running with transformers instead - default_vectorizer_module: none + default_vectorizer_module: text2vec-contextionary # It is also possible to configure authentication and authorization through a # custom configmap The authorization and authentication values defined in From e9359c5fcaef12f669a4ab87371e678011396189 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 15:24:18 +0200 Subject: [PATCH 17/28] hack: using `main` tag for core image Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 5dfffa0..eb4a01c 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -7,7 +7,7 @@ image: # of weaviate. In accordance with Infra-as-code, you should pin this value # down and only change it if you explicitly want to upgrade the Weaviate # version. - tag: 1.26.3 + tag: main-b5da000 repo: semitechnologies/weaviate # Image pull policy: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy pullPolicy: IfNotPresent From decfeeae789856644225ecd63a307ce7c617f4e7 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 16:46:15 +0200 Subject: [PATCH 18/28] svc name resolution fix Signed-off-by: Kaviraj --- weaviate/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index eb4a01c..5e2376b 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -23,7 +23,7 @@ experimental: args: - '--target=querier' - '--query.grpc.listen=0.0.0.0:7071' - - '--query.schema.addr=http://weaviate.default.svc.cluster.local:80' + - '--query.schema.addr=http://weaviate' - '--monitoring.enabled' - '--monitoring.metrics_namespace=weaviate' - '--monitoring.port=7072' @@ -33,7 +33,7 @@ experimental: - name: AWS_SECRET_KEY value: 'aws_secret_key' - name: OFFLOAD_S3_ENDPOINT - value: 'http://minio.default.svc.cluster.local:9000' + value: 'http://minio:9000' service: name: querier From ea878c20c0400a6ba023f1524cf4b8e50a72d179 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 17:02:45 +0200 Subject: [PATCH 19/28] fix contextionary URL Signed-off-by: Kaviraj --- weaviate/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 5e2376b..7b71a47 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -24,6 +24,7 @@ experimental: - '--target=querier' - '--query.grpc.listen=0.0.0.0:7071' - '--query.schema.addr=http://weaviate' + - '--query.vectorize-addr=contextionary:9999' - '--monitoring.enabled' - '--monitoring.metrics_namespace=weaviate' - '--monitoring.port=7072' From a39fb4be8c19bf075232df2cd541969b4220edf7 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 17:29:56 +0200 Subject: [PATCH 20/28] revert back original values.yaml Signed-off-by: Kaviraj --- weaviate/values.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 7b71a47..4bec26d 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -7,7 +7,7 @@ image: # of weaviate. In accordance with Infra-as-code, you should pin this value # down and only change it if you explicitly want to upgrade the Weaviate # version. - tag: main-b5da000 + tag: 1.26.3 repo: semitechnologies/weaviate # Image pull policy: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy pullPolicy: IfNotPresent @@ -15,8 +15,8 @@ image: experimental: querier: - enabled: true - image: semitechnologies/weaviate-experimental:preview-chore-push-docker-support-serverless-experimental-image-push-ec74d48 + enabled: false + image: semitechnologies/weaviate-experimental:main-b5da000 storage_size: 10Gi pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) command: ["/bin/weaviate"] @@ -397,8 +397,7 @@ envSecrets: # Configure offload providers offload: s3: - # TODO(kavi): Move the changes on this block to some kind of `values-overrides` file - enabled: true + 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. @@ -414,7 +413,7 @@ offload: # 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: http://minio.default.svc.cluster.local:9000 + # OFFLOAD_S3_ENDPOINT: custom.minio.endpoint.address # Optional setting. Defaults to true. # Set this option if you don't want to use SSL. @@ -425,7 +424,7 @@ offload: # 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 - OFFLOAD_S3_BUCKET_AUTO_CREATE: true + # OFFLOAD_S3_BUCKET_AUTO_CREATE: true # You can pass environment AWS settings here: # Define the region @@ -583,7 +582,7 @@ modules: text2vec-contextionary: # Enable deployment of this module - enabled: true + enabled: false # The configuration below is ignored if enabled==false fullnameOverride: contextionary @@ -1866,7 +1865,7 @@ modules: # use this module as the vectorizer if nothing else is specified. Can be # overwritten on a per-class basis. # set to text2vec-transformers if running with transformers instead - default_vectorizer_module: text2vec-contextionary + default_vectorizer_module: none # It is also possible to configure authentication and authorization through a # custom configmap The authorization and authentication values defined in From 709cc7bc1dd37d24402b016781295b72b6c1fc3e Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 17:30:58 +0200 Subject: [PATCH 21/28] change image pull policy Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 4bec26d..7243521 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -18,7 +18,7 @@ experimental: enabled: false image: semitechnologies/weaviate-experimental:main-b5da000 storage_size: 10Gi - pullPolicy: Always # Because currently we support only single `latest` tag (being experimental) + pullPolicy: IfNotpresent command: ["/bin/weaviate"] args: - '--target=querier' From 6ddde70e568375ccc850da86b0ef85d7c16341f2 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 17:39:11 +0200 Subject: [PATCH 22/28] fix image pull policy Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 7243521..e6de9c5 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -18,7 +18,7 @@ experimental: enabled: false image: semitechnologies/weaviate-experimental:main-b5da000 storage_size: 10Gi - pullPolicy: IfNotpresent + pullPolicy: IfNotPresent command: ["/bin/weaviate"] args: - '--target=querier' From 5264e4f6e998102297c855b6aa215beff2df553b Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Tue, 15 Oct 2024 17:49:40 +0200 Subject: [PATCH 23/28] conditional enable service and deployment of querier Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 2 ++ weaviate/templates/querierService.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index e959cd8..b735b73 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -1,3 +1,4 @@ +{{ if .Values.experimental.querier.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -453,3 +454,4 @@ spec: hostAliases: {{ toYaml . | nindent 8 }} {{- end }} +{{- end }} diff --git a/weaviate/templates/querierService.yaml b/weaviate/templates/querierService.yaml index 1f7bbbe..2bccc5d 100644 --- a/weaviate/templates/querierService.yaml +++ b/weaviate/templates/querierService.yaml @@ -1,3 +1,4 @@ +{{ if .Values.experimental.querier.enabled }} apiVersion: v1 kind: Service metadata: @@ -32,3 +33,4 @@ spec: {{ end -}} {{- end -}} {{- end }} +{{- end }} From b328678dffe27c458b8c66e630719a645023a5c0 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Thu, 17 Oct 2024 11:13:23 +0200 Subject: [PATCH 24/28] PR remarks Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 5 ++--- weaviate/values.yaml | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index b735b73..112cd63 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -8,10 +8,9 @@ metadata: app: querier app.kubernetes.io/name: querier spec: - replicas: {{ .Values.replicas }} + replicas: {{ .Values.experimental.querier.replicas }} updateStrategy: {{ toYaml .Values.updateStrategy | indent 4}} - serviceName: {{ .Values.experimental.querier.service.name }}-headless selector: matchLabels: app: querier @@ -42,7 +41,7 @@ spec: args: {{ toYaml . | nindent 10 }} {{- end }} resources: -{{ toYaml .Values.resources | indent 10 }} +{{ toYaml .Values.experimental.querier.resources | indent 10 }} env: {{- if or $.Values.experimental.querier.env $.Values.experimental.querier.envSecrets }} {{- range $key, $value := $.Values.env }} diff --git a/weaviate/values.yaml b/weaviate/values.yaml index e6de9c5..82d6079 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -16,18 +16,17 @@ image: experimental: querier: enabled: false + replicas: 3 image: semitechnologies/weaviate-experimental:main-b5da000 storage_size: 10Gi pullPolicy: IfNotPresent command: ["/bin/weaviate"] args: - '--target=querier' - - '--query.grpc.listen=0.0.0.0:7071' - '--query.schema.addr=http://weaviate' - '--query.vectorize-addr=contextionary:9999' - '--monitoring.enabled' - '--monitoring.metrics_namespace=weaviate' - - '--monitoring.port=7072' env: - name: AWS_ACCESS_KEY value: 'aws_access_key' @@ -36,17 +35,25 @@ experimental: - 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 + port: 9091 + targetPort: 9091 - name: http protocol: TCP - port: 7072 # prometheus metrics - targetPort: 7072 + port: 8081 # prometheus metrics + targetPort: 8081 type: LoadBalancer loadBalancerSourceRanges: [] # optionally set cluster IP if you want to set a static IP From f1b8aa60d3cf9cd938210214cf59093cc919bbd7 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Thu, 17 Oct 2024 11:31:03 +0200 Subject: [PATCH 25/28] use different port as 9091 is generally used by prometheus server Signed-off-by: Kaviraj --- weaviate/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 82d6079..f318d78 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -48,8 +48,8 @@ experimental: ports: - name: grpc protocol: TCP - port: 9091 - targetPort: 9091 + port: 7071 + targetPort: 7071 - name: http protocol: TCP port: 8081 # prometheus metrics From b954d43922a9f46420630f46693d4ea6fe6053d2 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Thu, 17 Oct 2024 11:49:36 +0200 Subject: [PATCH 26/28] replace the newer querier image Signed-off-by: Kaviraj --- weaviate/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index f318d78..faf857e 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -17,7 +17,7 @@ experimental: querier: enabled: false replicas: 3 - image: semitechnologies/weaviate-experimental:main-b5da000 + image: semitechnologies/weaviate-experimental:preview-chore-change-default-configs-on-querier-23d39eb storage_size: 10Gi pullPolicy: IfNotPresent command: ["/bin/weaviate"] From ea9c096e884a587323769506bc99e02d175b5249 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Fri, 18 Oct 2024 11:57:14 +0200 Subject: [PATCH 27/28] change metrics port of querier to 2112 Signed-off-by: Kaviraj --- weaviate/templates/querierDeployment.yaml | 1 + weaviate/values.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/weaviate/templates/querierDeployment.yaml b/weaviate/templates/querierDeployment.yaml index 112cd63..9c5771b 100644 --- a/weaviate/templates/querierDeployment.yaml +++ b/weaviate/templates/querierDeployment.yaml @@ -7,6 +7,7 @@ metadata: name: querier app: querier app.kubernetes.io/name: querier + app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.experimental.querier.replicas }} updateStrategy: diff --git a/weaviate/values.yaml b/weaviate/values.yaml index faf857e..58169eb 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -26,7 +26,9 @@ experimental: - '--query.schema.addr=http://weaviate' - '--query.vectorize-addr=contextionary:9999' - '--monitoring.enabled' + - '--monitoring.port=2112' - '--monitoring.metrics_namespace=weaviate' + env: - name: AWS_ACCESS_KEY value: 'aws_access_key' @@ -52,8 +54,8 @@ experimental: targetPort: 7071 - name: http protocol: TCP - port: 8081 # prometheus metrics - targetPort: 8081 + port: 2112 # prometheus metrics + targetPort: 2112 type: LoadBalancer loadBalancerSourceRanges: [] # optionally set cluster IP if you want to set a static IP From 8847ae0d2deb8a1908917f36c93b53c485095a5c Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 21 Oct 2024 14:27:17 +0200 Subject: [PATCH 28/28] force download from s3 for demo Signed-off-by: Kaviraj --- weaviate/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 58169eb..6f78c3d 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -25,6 +25,7 @@ experimental: - '--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'