danswer-ai / danswer

Gen-AI Chat for Teams - Think ChatGPT if it had access to your team's unique knowledge.
https://docs.danswer.dev/
Other
9.85k stars 1.11k forks source link

Running Danswer via the Helm chart requires a specific release name #1537

Closed artmatsak closed 1 month ago

artmatsak commented 1 month ago

I run Danswer locally via the Helm chart as follows:

cd danswer/deployment/kubernetes/charts/danswer-stack
helm install danswer-stack-kn .

The danswer-stack-kn name cannot be changed because of the following:

  1. The Helm chart for Vespa sets the app.kubernetes.io/instance selector label for the service to the release name:
{{/*
Selector labels
*/}}
{{- define "vespa.selectorLabels" -}}
app.kubernetes.io/name: {{ include "vespa.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
  1. Danswer's Helm chart hardcodes the app.kubernetes.io/instance label for the Vespa pod to danswer-stack-kn:
  podLabels: 
    app: vespa
    app.kubernetes.io/instance: danswer-stack-kn
    app.kubernetes.io/name: vespa

Unless the Helm release is run with the very specific danswer-stack-kn name, there's a mismatch between Vespa service selector and pod labels, making the Vespa service inaccessible.

wyellink commented 1 month ago

You are correct. I am in the same situation. I have made the following changes to my values file to overwrite the original value:

vespa:
  podLabels:
    app.kubernetes.io/instance: your-release-name

P.S. There were some changes after the chart's consolidation in commit 026652d82741bd15b90e745ac37de8d80a908982. I recommend taking a look at the new charts at https://github.com/danswer-ai/danswer/tree/main/deployment/helm.

artmatsak commented 1 month ago

@wyellink The issue is no longer reproducible with the new charts, so I'm closing it.

Just a word of warning, make sure to clear any relevant PVCs if switching from the old charts to the new ones, or you'll run into strange PostgreSQL authentication errors.