From 9a049fbd967db0625c9d85cc7df0778c747812ca Mon Sep 17 00:00:00 2001 From: everpcpc Date: Fri, 5 Jan 2024 15:15:06 +0800 Subject: [PATCH] Upgrade databend to v1.2.279 --- src/stable/databend-meta/Chart.yaml | 4 +- src/stable/databend-meta/README.md | 2 +- .../templates/poddisruptionbudget.yaml | 11 +++ .../databend-meta/templates/statefulset.yaml | 7 +- src/stable/databend-meta/values.yaml | 2 + src/stable/databend-query/Chart.yaml | 8 +- src/stable/databend-query/README.md | 2 +- .../databend-query/charts/common-1.17.1.tgz | Bin 0 -> 14611 bytes .../databend-query/templates/configmap.yaml | 65 +++++++-------- src/stable/databend-query/templates/pvc.yaml | 16 ---- .../databend-query/templates/service.yaml | 1 + .../{deployment.yaml => statefulset.yaml} | 75 +++++++++--------- src/stable/databend-query/values.yaml | 44 ++++------ 13 files changed, 107 insertions(+), 130 deletions(-) create mode 100644 src/stable/databend-meta/templates/poddisruptionbudget.yaml create mode 100644 src/stable/databend-query/charts/common-1.17.1.tgz delete mode 100644 src/stable/databend-query/templates/pvc.yaml rename src/stable/databend-query/templates/{deployment.yaml => statefulset.yaml} (68%) diff --git a/src/stable/databend-meta/Chart.yaml b/src/stable/databend-meta/Chart.yaml index e5ad7ed6d..b325b9a73 100644 --- a/src/stable/databend-meta/Chart.yaml +++ b/src/stable/databend-meta/Chart.yaml @@ -26,13 +26,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.6.1 +version: 0.7.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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v1.0.3-nightly" +appVersion: "v1.2.279" dependencies: - name: common diff --git a/src/stable/databend-meta/README.md b/src/stable/databend-meta/README.md index 42419b1ed..a0c427ed3 100644 --- a/src/stable/databend-meta/README.md +++ b/src/stable/databend-meta/README.md @@ -15,7 +15,7 @@ helm install my-release databend/databend-meta --namespace databend --create-nam Note that for a production cluster, you will likely want to override the following parameters in [values.yaml](values.yaml) with your own values. -- `resources.requests.memory` and `resources.limit.memory` allocate memory resource to query pods in your cluser. +- `resources.requests.memory` and `resources.limit.memory` allocate memory resource to query pods in your cluster. - `replicaCount` defaults to `1`, We strongly recommend that you set to `3` for HA. - `persistence.size` defaults to `10Gi` of disk space per pod, which you may increase or decrease for your use case. - `persistence.storageClass` uses the default storage class for your environment. diff --git a/src/stable/databend-meta/templates/poddisruptionbudget.yaml b/src/stable/databend-meta/templates/poddisruptionbudget.yaml new file mode 100644 index 000000000..e574eaabe --- /dev/null +++ b/src/stable/databend-meta/templates/poddisruptionbudget.yaml @@ -0,0 +1,11 @@ +{{- if gt (int .Values.replicaCount) 1 }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "databend-meta.fullname" . }} +spec: + maxUnavailable: 1 + selector: + matchLabels: + {{- include "databend-meta.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/src/stable/databend-meta/templates/statefulset.yaml b/src/stable/databend-meta/templates/statefulset.yaml index 621208647..6b4d6c3c3 100644 --- a/src/stable/databend-meta/templates/statefulset.yaml +++ b/src/stable/databend-meta/templates/statefulset.yaml @@ -10,11 +10,7 @@ metadata: spec: serviceName: {{ $fullName }} replicas: {{ .Values.replicaCount }} - {{- if $bootstrap }} - podManagementPolicy: OrderedReady - {{- else }} podManagementPolicy: Parallel - {{- end }} selector: matchLabels: {{- include "databend-meta.selectorLabels" . | nindent 6 }} @@ -147,6 +143,9 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP + {{- with .Values.envs }} + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: {{- if .Values.persistence.enabled }} - name: data diff --git a/src/stable/databend-meta/values.yaml b/src/stable/databend-meta/values.yaml index 82523dc7a..1009b86da 100644 --- a/src/stable/databend-meta/values.yaml +++ b/src/stable/databend-meta/values.yaml @@ -44,6 +44,8 @@ config: raft: dir: /data/databend-meta/raft +envs: [] + persistence: enabled: true storageClass: "" diff --git a/src/stable/databend-query/Chart.yaml b/src/stable/databend-query/Chart.yaml index 36d3c45f7..f85179f51 100644 --- a/src/stable/databend-query/Chart.yaml +++ b/src/stable/databend-query/Chart.yaml @@ -25,19 +25,15 @@ 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.5.1 +version: 0.8.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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v1.0.3-nightly" +appVersion: "v1.2.279" dependencies: -- name: minio - version: 3.6.3 - repository: https://charts.min.io/ - condition: minio.enabled - name: common version: 1.x.x repository: https://charts.bitnami.com/bitnami diff --git a/src/stable/databend-query/README.md b/src/stable/databend-query/README.md index a448cb9fc..70b138bfa 100644 --- a/src/stable/databend-query/README.md +++ b/src/stable/databend-query/README.md @@ -15,7 +15,7 @@ helm install my-release databend/databend-query --namespace databend --create-na Note that for a production cluster, you will likely want to override the following parameters in [values.yaml](values.yaml) with your own values. -- `resources.requests.memory` and `resources.limit.memory` allocate memory resource to query pods in your cluser. +- `resources.requests.memory` and `resources.limit.memory` allocate memory resource to query pods in your cluster. - `config.meta.address` indicates the grpc address of a [Databend Meta](../databend-meta) service. - `config.storage.type` defaults to `fs` for testing only, `s3` is recommended in production. - `config.storage.s3.accessKeyId` and `config.storage.s3.secretAccessKey` should be set when using `s3` storage, `config.storage.s3.endpointUrl` defaults to `https://s3.amazonaws.com`. diff --git a/src/stable/databend-query/charts/common-1.17.1.tgz b/src/stable/databend-query/charts/common-1.17.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..d2e66eb702c03db2f57932528265520573877492 GIT binary patch literal 14611 zcmV+uIqb$CiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo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nKCdo zsthHVOHmp&n^)DI*8pYz!gOx$570^1D?{}%2%c7``7#JJ&p)mdT`{YBwSh-Y)PGeV zDw*Efv(fu6M71F^Y?vAsW}N`(LYJxTlljIz>-61bUhT$BBOioOtUERGsM|%&D8d;OLS$Dq-bGHuDBnAdXlle{vKmQ$b zyg2E#OLnbT0Hwrs$^?_`=yh*|sN$&@rc6_*SnV1|kfQFnpRUYA?RC2FlcIvLgKT!; z^BPXGy|9GV2>ssMvZcEkxvu5%CD^D2-#NPFhGv z&PIm0j;*V~TFx$0Q>Cm4(({f&=<_3n5nPsPD>qLyJQIFPA4?c1#f9h`h!7bTt2b$E zbSp)cPep_&;)LZXP4j#JNR(^G3=7q~Q&>(K5uK}XEYK)=VdCV=vgUWq$c#c;EW*1? z3_Fu>Ji^?msh`O6_v@65%@Fst@}J#I;BJHj7CTl- z>?b-lgXj7n8O-(+v-~9RC`%wA^gsla@}$mWv^yvAquUFh$V>I|xs~?GF1ol&~^Oug|mnoWS*2{Fv5fMhB z@uvuwR6d-A=1VxX7UhneqGDI57knwRZ zF{MQBhvTC+Z_nOzch$806HTxX#RNH=o4GME$=J~)DD5%k*l2Y^;gS=nZyOP8Brg%i zotOy8$uN^80y(UR0Kb4z#uS3XGdMmA;ML*T@!8YP$K&^ZfA`aS_;`4FdieJJ@tZSv zcM3=E-o8G5fBf$48NB-|9KQVre1H7*^;5vaIPyNFI-dmNK&E;+4?AZzIgD#O_ugw) zEQugNbey3vhB2FAvq_L*J|)6Tkch^egiMLcPf_bm_zhh=^6)%756_)H|33f#|NrB> J+Z+IZ0RY0N)YJd~ literal 0 HcmV?d00001 diff --git a/src/stable/databend-query/templates/configmap.yaml b/src/stable/databend-query/templates/configmap.yaml index 4a46525c5..337c3e6aa 100644 --- a/src/stable/databend-query/templates/configmap.yaml +++ b/src/stable/databend-query/templates/configmap.yaml @@ -1,3 +1,4 @@ +{{- $storageType := .Values.config.storage.type }} apiVersion: v1 kind: ConfigMap metadata: @@ -17,6 +18,17 @@ data: management_mode = {{ .Values.config.query.managementMode }} jwt_key_file = {{ .Values.config.query.jwtKeyFile | quote }} + max_server_memory_usage = {{ .Values.config.query.maxServerMemoryUsage | default 0 }} + max_memory_limit_enabled = {{ .Values.config.query.maxMemoryLimitEnabled | default false }} + + {{- range $field, $value := .Values.config.query.extra }} + {{- if (kindIs "string" $value) }} + {{ $field }} = {{ $value | quote }} + {{- else }} + {{ $field }} = {{ $value }} + {{- end }} + {{- end }} + {{- range .Values.config.query.users }} [[query.users]] name = {{ .name | quote }} @@ -28,19 +40,11 @@ data: {{- end }} {{- end }} - {{- range $field, $value := .Values.config.query.extra }} - {{- if (kindIs "string" $value) }} - {{ $field }} = {{ $value | quote }} - {{- else }} - {{ $field }} = {{ $value }} - {{- end }} - {{- end }} - [log] [log.file] on = {{ .Values.config.log.file.enabled }} level = {{ .Values.config.log.file.level | default "INFO" | quote }} - dir = "/var/log/databend" + dir = {{ .Values.config.log.file.dir | default "/var/log/databend" | quote }} [log.stderr] on = {{ .Values.config.log.stderr.enabled }} level = {{ .Values.config.log.stderr.level | default "WARN" | quote }} @@ -52,25 +56,11 @@ data: client_timeout_in_second = {{ .Values.config.meta.clientTimeoutInSecond | default 60 }} [storage] - storage_type = {{ .Values.config.storage.type | quote }} + type = {{ $storageType | quote }} + allow_insecure = {{ .Values.config.storage.allow_insecure | default false }} - {{- if eq .Values.config.storage.type "fs" }} - [storage.fs] - {{- range $field, $value := .Values.config.storage.fs }} - {{- if (kindIs "string" $value) }} - {{ $field }} = {{ $value | quote }} - {{- else }} - {{ $field }} = {{ $value }} - {{- end }} - {{- end }} - {{- else if eq .Values.config.storage.type "s3"}} + {{- if eq $storageType "s3"}} [storage.s3] - {{- if .Values.minio.enabled }} - bucket = {{ .Values.config.storage.s3.bucket | quote }} - endpoint_url = "http://{{ printf "%s-%s.%s" .Release.Name "minio" .Release.Namespace }}:{{ .Values.minio.minioAPIPort }}" - access_key_id = {{ .Values.minio.rootUser | quote }} - secret_access_key = {{ .Values.minio.rootPassword | quote }} - {{- else }} {{- range $field, $value := .Values.config.storage.s3 }} {{- if (kindIs "string" $value) }} {{ $field }} = {{ $value | quote }} @@ -78,22 +68,25 @@ data: {{ $field }} = {{ $value }} {{- end }} {{- end }} - {{- end }} - {{- else if eq .Values.config.storage.type "gcs"}} - {{- range $field, $value := .Values.config.storage.gcs }} + {{- else }} + [storage.{{ $storageType }}] + {{- range $name, $configs := .Values.config.storage }} + {{- if eq $name $storageType }} + {{- range $field, $value := $configs }} {{- if (kindIs "string" $value) }} {{ $field }} = {{ $value | quote }} {{- else }} {{ $field }} = {{ $value }} {{- end }} {{- end }} - {{- else if eq .Values.config.storage.type "oss"}} - [storage.oss] - {{- range $field, $value := .Values.config.storage.oss }} - {{- if (kindIs "string" $value) }} - {{ $field }} = {{ $value | quote }} - {{- else }} - {{ $field }} = {{ $value }} {{- end }} {{- end }} {{- end }} + + {{- if .Values.cache.enabled }} + [cache] + data_cache_storage = "disk" + [cache.disk] + path = {{ .Values.cache.path | default "/var/lib/databend/cache" | quote }} + max_bytes = {{ .Values.cache.maxBytes | default 21474836480 | int64 }} + {{- end }} diff --git a/src/stable/databend-query/templates/pvc.yaml b/src/stable/databend-query/templates/pvc.yaml deleted file mode 100644 index 224e21b7d..000000000 --- a/src/stable/databend-query/templates/pvc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.persistence.enabled }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "databend-query.fullname" . }} - labels: - {{- include "databend-query.labels" . | nindent 4 }} -spec: - accessModes: ["ReadWriteMany"] - resources: - requests: - storage: {{ .Values.persistence.size }} - {{- if .Values.persistence.storageClass }} - storageClassName: "{{ .Values.persistence.storageClass }}" - {{- end }} -{{- end }} diff --git a/src/stable/databend-query/templates/service.yaml b/src/stable/databend-query/templates/service.yaml index d1c915b02..615705fe8 100644 --- a/src/stable/databend-query/templates/service.yaml +++ b/src/stable/databend-query/templates/service.yaml @@ -19,3 +19,4 @@ spec: {{- end }} selector: {{- include "databend-query.selectorLabels" . | nindent 4 }} + statefulset.kubernetes.io/pod-name: {{ include "databend-query.fullname" . }}-0 diff --git a/src/stable/databend-query/templates/deployment.yaml b/src/stable/databend-query/templates/statefulset.yaml similarity index 68% rename from src/stable/databend-query/templates/deployment.yaml rename to src/stable/databend-query/templates/statefulset.yaml index c9ea95758..b0291457b 100644 --- a/src/stable/databend-query/templates/deployment.yaml +++ b/src/stable/databend-query/templates/statefulset.yaml @@ -1,11 +1,13 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "databend-query.fullname" . }} labels: {{- include "databend-query.labels" . | nindent 4 }} spec: + serviceName: {{ include "databend-query.fullname" . }} replicas: {{ .Values.replicaCount }} + podManagementPolicy: Parallel selector: matchLabels: {{- include "databend-query.selectorLabels" . | nindent 6 }} @@ -41,18 +43,10 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - name: metric - containerPort: 7070 - - name: admin - containerPort: 8080 - - name: flight - containerPort: 9090 - - name: mysql - containerPort: 3307 - - name: clickhouse - containerPort: 9000 - - name: http - containerPort: 8000 + {{- range $key, $val := .Values.service.ports }} + - name: {{ $key }} + containerPort: {{ $val}} + {{- end }} livenessProbe: httpGet: path: /v1/health @@ -80,30 +74,37 @@ spec: fieldRef: fieldPath: status.podIP - name: QUERY_METRIC_API_ADDRESS - value: "$(POD_IP):7070" + value: "$(POD_IP):{{ .Values.service.ports.metric | default 7070 }}" - name: QUERY_ADMIN_API_ADDRESS - value: "$(POD_IP):8080" + value: "$(POD_IP):{{ .Values.service.ports.admin | default 8080 }}" - name: QUERY_FLIGHT_API_ADDRESS - value: "$(POD_IP):9090" + value: "$(POD_IP):{{ .Values.service.ports.flight | default 9090 }}" + - name: QUERY_HTTP_HANDLER_HOST + value: 0.0.0.0 + - name: QUERY_HTTP_HANDLER_PORT + value: {{ .Values.service.ports.http | default 8000 | quote }} + - name: QUERY_FLIGHT_SQL_HANDLER_HOST + value: 0.0.0.0 + - name: QUERY_FLIGHT_SQL_HANDLER_PORT + value: {{ .Values.service.ports.flightsql | default 8900 | quote }} - name: QUERY_MYSQL_HANDLER_HOST value: 0.0.0.0 - name: QUERY_MYSQL_HANDLER_PORT - value: "3307" - - name: QUERY_CLICKHOUSE_HANDLER_HOST + value: {{ .Values.service.ports.mysql | default 3307 | quote }} + - name: QUERY_CLICKHOUSE_HTTP_HANDLER_HOST value: 0.0.0.0 - - name: QUERY_CLICKHOUSE_HANDLER_PORT - value: "9000" - - name: QUERY_HTTP_HANDLER_HOST - value: 0.0.0.0 - - name: QUERY_HTTP_HANDLER_PORT - value: "8000" + - name: QUERY_CLICKHOUSE_HTTP_HANDLER_PORT + value: {{ .Values.service.ports.ckhttp |default 8124 | quote }} + {{- with .Values.envs }} + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - name: config # Note: subPath volume mount will not receive ConfigMap update. mountPath: /etc/databend-query - {{- if .Values.persistence.enabled }} - - name: data - mountPath: {{ .Values.persistence.mountPath }} + {{- if .Values.cache.enabled }} + - name: cache + mountPath: {{ .Values.cache.path | default "/var/lib/databend/cache" | quote }} {{- end }} {{- if .Values.sidecars }} {{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} @@ -112,15 +113,6 @@ spec: - name: config configMap: name: {{ include "databend-query.fullname" .}} - {{- if .Values.persistence.enabled }} - - name: data - persistentVolumeClaim: - {{- if .Values.persistence.existingClaim }} - claimName: {{ .Values.persistence.existingClaim }} - {{- else }} - claimName: {{ include "databend-query.fullname" . }} - {{- end }} - {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -133,3 +125,14 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.cache.enabled }} + volumeClaimTemplates: + - metadata: + name: cache + spec: + accessModes: [ "ReadWriteOnce" ] + storageClassName: {{ .Values.cache.storageClass | quote }} + resources: + requests: + storage: {{ .Values.cache.maxBytes | quote }} + {{- end }} diff --git a/src/stable/databend-query/values.yaml b/src/stable/databend-query/values.yaml index 08609a66c..6721c33ca 100644 --- a/src/stable/databend-query/values.yaml +++ b/src/stable/databend-query/values.yaml @@ -26,15 +26,22 @@ serviceAccount: service: type: ClusterIP ports: - mysql: 3307 - http: 8000 - clickhouse: 9000 metric: 7070 admin: 8080 flight: 9090 + + http: 8000 + flightsql: 8900 + mysql: 3307 + ckhttp: 8124 + # Annotations to add to the service annotations: {} +envs: [] + # - name: SENTRY_TRACES_SAMPLE_RATE + # value: "0.5" + serviceMonitor: enabled: false port: metric @@ -52,6 +59,7 @@ config: managementMode: false jwtKeyFile: "" + # NOTE: user `root` is already built-in, will be ignored if defined here users: [] # - name: databend # # available type: sha256_password, double_sha1_password, no_password, jwt @@ -66,7 +74,7 @@ config: file: enabled: false level: "INFO" - dir: "/data/databend-query/_log" + dir: "/var/log/databend" stderr: enabled: true level: "WARN" @@ -84,10 +92,7 @@ config: # [storage] storage: - type: "fs" - # [storage.fs] - fs: - data_path: "/data/databend-query/_data" + type: "s3" # [storage.s3] s3: @@ -110,28 +115,11 @@ config: access_key_id: "" access_key_secret: "" -persistence: +cache: enabled: false - existingClaim: "" + path: "/var/lib/databend/cache" + maxBytes: 21474836480 storageClass: "" - size: 10Gi - mountPath: /data/databend-query - -# Configuration for minio subchart -# Not recommended for production -minio: - enabled: false - replicas: 5 - rootUser: rootuser - rootPassword: rootpassword - persistence: - enabled: true - storageClass: "" - size: 10Gi - minioAPIPort: 9000 - resources: - requests: - memory: 500Mi ingress: enabled: false