quickwit-oss / helm-charts

Helm charts for Quickwit
https://helm.quickwit.io
MIT License
22 stars 28 forks source link

QW_CLUSTER_ENDPOINT cannot be customized #108

Open splix opened 1 day ago

splix commented 1 day ago

In _helpers.tpl there is the following lines:

{{- define "quickwit.environment" -}}
....
- name: QW_CLUSTER_ENDPOINT
  value: http://{{ include "quickwit.fullname" $ }}-metastore.{{ $.Release.Namespace }}.svc.cluster.local:7280
{{- range $key, $value := .Values.environment }}
- name: "{{ $key }}"
  value: "{{ $value }}"
{{- end }}
{{- end }}

Which hardcodes the cluster name as cluster.local which is not always the case, and so Quickwit doesn't work in clusters with non-default name.

It's impossible to override the value by specifying an .environment because Kubernetes takes the first value in the env list. So, right now it allows only to append a variable.

I see at least 3 ways how it can be fixed:

  1. Allows to set the cluster name. That's probably most common in other charts
  2. Do not use the cluster name at all http://{{ include "quickwit.fullname" $ }}-metastore.{{ $.Release.Namespace }}:7280 would suffice since it's not supposed to connect to an endpoint in another cluster.
  3. Move the last part (i..e, the range loop) to the top, which would allow to update any environment variable, not just append.
guilload commented 1 day ago

I vote for 1. with cluster.local being the default value for the cluster domain. Want to open a PR?

splix commented 1 day ago

Yes, I can do that