Skip to content

Commit

Permalink
Merge branch 'main' into fix/remove-default-tz
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac authored Feb 13, 2025
2 parents d8c8b12 + e1f1623 commit c29153b
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 111 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ jobs:
- name: Collect Logs
if: always()
run: |
kubectl logs -n databend-meta -l app.kubernetes.io/name=databend-meta
kubectl logs -n tenant1 -l app.kubernetes.io/name=databend-query
kubectl logs --tail=1000 -n databend-meta -l app.kubernetes.io/name=databend-meta
kubectl logs --tail=1000 -n tenant1 -l app.kubernetes.io/name=databend-query
19 changes: 2 additions & 17 deletions charts/databend-meta/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,11 @@ keywords:
- meta
- kv

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
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.9.7
version: 0.10.0

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v1.2.615"
appVersion: "v1.2.680"

dependencies:
- name: common
Expand Down
17 changes: 9 additions & 8 deletions charts/databend-meta/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ grpc_api_address = "0.0.0.0:{{ .Values.service.ports.grpc }}"

[log]
[log.stderr]
on = true
level = {{ .Values.config.stdLogLevel | quote }}
prefix_filter = {{ .Values.config.logPrefixFilter | quote }}
on = {{ .Values.config.log.stderr.enabled }}
level = {{ .Values.config.log.stderr.level | quote }}
format = {{ .Values.config.log.stderr.format | quote }}
[log.file]
level = {{ .Values.config.logLevel | quote }}
format = "json"
dir = {{ .Values.config.logDir | quote }}
prefix_filter = {{ .Values.config.logPrefixFilter | quote }}
on = {{ .Values.config.log.file.enabled }}
level = {{ .Values.config.log.file.level | quote }}
format = {{ .Values.config.log.file.format | quote }}
dir = {{ .Values.config.log.file.dir | quote }}
prefix_filter = {{ .Values.config.log.file.prefixFilter | quote }}

[raft_config]
cluster_name = {{ .Values.config.clusterName | quote }}
raft_dir = {{ .Values.config.raft.dir | quote }}
raft_listen_host = "0.0.0.0"
raft_api_port = 28004
raft_api_port = {{ .Values.service.ports.raft }}
max_applied_log_to_keep = 102400
install_snapshot_timeout = 60000
{{- end }}
2 changes: 1 addition & 1 deletion charts/databend-meta/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.existingConfigMaps }}
{{- if not .Values.existingConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
18 changes: 8 additions & 10 deletions charts/databend-meta/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,26 @@ spec:
echo "initialize leader node";
exec /databend-meta --id ${ID} \
--single \
--raft-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local" \
--grpc-api-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local" \
--raft-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}" \
--grpc-api-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}" \
--config-file /etc/databend/meta.yaml
;;
*)
echo "initialize follower node";
exec /databend-meta --id ${ID} \
--join "${NAME}-0.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local:28004" \
--raft-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local" \
--grpc-api-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local" \
--join "${NAME}-0.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}:{{ .Values.service.ports.raft }}" \
--raft-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}" \
--grpc-api-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}" \
--config-file /etc/databend/meta.yaml
;;
esac
{{- else }}
exec /databend-meta --id ${ID} \
{{- range $i := until $replicaCount }}
--join "${NAME}-{{ $i }}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local:28004" \
--join "${NAME}-{{ $i }}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}:{{ .Values.service.ports.raft }}" \
{{- end }}
--raft-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local" \
--grpc-api-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.cluster.local" \
--raft-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}" \
--grpc-api-advertise-host "${POD_NAME}.{{ $fullName }}.${POD_NAMESPACE}.svc.{{ .Values.service.clusterDomain }}" \
--config-file /etc/databend/meta.yaml
{{- end }}
else
Expand All @@ -92,8 +92,6 @@ spec:
- name: {{ $key }}
containerPort: {{ $val }}
{{- end }}
- name: raft
containerPort: 28004
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
Expand Down
19 changes: 14 additions & 5 deletions charts/databend-meta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
bootstrap: false
replicaCount: 1

# This value should be the name of the file containing the statup script for your Databend-meta pods.
# This value should be the name of the file containing the statup script for your Databend-meta pods.
# You will still need to mount your script as an extra volumes.
customStartupScript: false

Expand Down Expand Up @@ -46,8 +46,10 @@ readinessProbe:

service:
type: ClusterIP
clusterDomain: "cluster.local"
ports:
admin: 28002
raft: 28004
grpc: 9191
# Annotations to add to the service
annotations: {}
Expand All @@ -65,11 +67,18 @@ podMonitor:

# would be ignored if `existingConfigMap` is set
config:
log:
file:
enabled: false
level: INFO
format: json
dir: /data/databend-meta/log
prefixFilter: ""
stderr:
enabled: true
format: text
level: WARN
clusterName: databend
logDir: /data/databend-meta/log
logLevel: INFO
logPrefixFilter: ""
stdLogLevel: WARN
raft:
dir: /data/databend-meta/raft

Expand Down
4 changes: 2 additions & 2 deletions charts/databend-query/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ 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.11.1
version: 0.11.2

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v1.2.615"
appVersion: "v1.2.680"

dependencies:
- name: common
Expand Down
2 changes: 1 addition & 1 deletion charts/databend-query/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ data:
[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 }}]
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.{{ $.Values.config.meta.clusterDomain }}:{{ $.Values.config.meta.port }}",{{ end }}]
{{- else }}
endpoints = [{{ range .Values.config.meta.endpoints }}{{ . | quote }},{{ end }}]
{{- end }}
Expand Down
7 changes: 5 additions & 2 deletions charts/databend-query/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replicaCount: 1
# Could be StatefulSet or Deployment
workload: StatefulSet

# By default, the queries are routed to the first node in the StatefulSet, and this node is considered
# By default, the queries are routed to the first node in the StatefulSet, and this node is considered
# as the coordinator. If you want to enable load balance queries across nodes, set this to true. Please
# note that when this is enabled, you can not get the consistent running queries by SHOW PROCESSLIST.
enableLoadBalance: false
Expand Down Expand Up @@ -95,7 +95,7 @@ config:
# # sha1sum: echo -n "password" | sha1sum | cut -d' ' -f1 | xxd -r -p | sha1sum
# authType: double_sha1_password
# authString: 3081f32caef285c232d066033c89a78d88a6d8a5 # databend


# [log]
log:
Expand All @@ -111,15 +111,18 @@ config:
enabled: false
otlp_endpoint: ""
otlp_protocol: "http"
otlp_labels: {}
profile:
enabled: false
otlp_endpoint: ""
otlp_protocol: "http"
otlp_labels: {}

# [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
clusterDomain: "cluster.local"
# Databend-meta replica count
replicas: 3
# Databend-meta port if you need to change it
Expand Down
Loading

0 comments on commit c29153b

Please sign in to comment.