Skip to content

Commit

Permalink
feat(query): auto generate meta endpoints feature (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkapper authored Jul 31, 2024
1 parent 4e8e004 commit b1c12cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/databend-query/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.10.2
version: 0.10.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 4 additions & 0 deletions charts/databend-query/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ data:
level = {{ .Values.config.log.stderr.level | default "WARN" | quote }}
[meta]
{{- if .Values.config.meta.generateEndpoints }}
endpoints = [{{ range $i := (untilStep 0 (int $.Values.config.meta.replicas) 1) }}"{{ $.Release.Name }}-databend-meta-{{ $i }}.{{ $.Release.Name }}-databend-meta.{{ $.Values.config.meta.namespace | default $.Release.Namespace }}.svc.cluster.local:{{ $.Values.config.meta.port }}",{{ end }}]
{{- else }}
endpoints = [{{ range .Values.config.meta.endpoints }}{{ . | quote }},{{ end }}]
{{- end }}
username = {{ .Values.config.meta.username | quote }}
password = {{ .Values.config.meta.password | quote }}
client_timeout_in_second = {{ .Values.config.meta.clientTimeoutInSecond | default 60 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/databend-query/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ config:

# [meta]
meta:
# If databend-meta is hosted in the same cluster as databend-data, you can enable this to generate endpoints in a K8s native way.
generateEndpoints: false
# Databend-meta replica count
replicas: 3
# Databend-meta port if you need to change it
port: 9191
# If databend-meta is located in the same cluster, but a different namespace, specify it here
namespace: ""
# Set endpoints to use remote meta service
endpoints:
# <podName>.<serviceName>.<namespace>.svc.cluster.local:9191
Expand Down

0 comments on commit b1c12cf

Please sign in to comment.