From 203e7a5d45dc0c76800dec97dc89afc2c115eaf7 Mon Sep 17 00:00:00 2001 From: liyang Date: Thu, 5 Sep 2024 17:18:08 +0800 Subject: [PATCH] feat(greptimedb-cluster): add debug pod (#163) * feat(greptimedb-cluster): add debug pod * chore: rename debug pod * chore: rename debug pod * chore: update docs --- charts/greptimedb-cluster/Chart.yaml | 2 +- charts/greptimedb-cluster/README.md | 7 +++-- .../templates/debug-depoyment.yaml | 27 +++++++++++++++++++ charts/greptimedb-cluster/values.yaml | 21 ++++++++++++++- 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 charts/greptimedb-cluster/templates/debug-depoyment.yaml diff --git a/charts/greptimedb-cluster/Chart.yaml b/charts/greptimedb-cluster/Chart.yaml index f587a6f..96cfe03 100644 --- a/charts/greptimedb-cluster/Chart.yaml +++ b/charts/greptimedb-cluster/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: greptimedb-cluster description: A Helm chart for deploying GreptimeDB cluster in Kubernetes. type: application -version: 0.2.9 +version: 0.2.10 appVersion: 0.9.2 home: https://github.com/GreptimeTeam/greptimedb sources: diff --git a/charts/greptimedb-cluster/README.md b/charts/greptimedb-cluster/README.md index 4cafda0..0973bbc 100644 --- a/charts/greptimedb-cluster/README.md +++ b/charts/greptimedb-cluster/README.md @@ -2,7 +2,7 @@ A Helm chart for deploying GreptimeDB cluster in Kubernetes. -![Version: 0.2.9](https://img.shields.io/badge/Version-0.2.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.2](https://img.shields.io/badge/AppVersion-0.9.2-informational?style=flat-square) +![Version: 0.2.10](https://img.shields.io/badge/Version-0.2.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.2](https://img.shields.io/badge/AppVersion-0.9.2-informational?style=flat-square) ## Source Code @@ -119,6 +119,9 @@ helm uninstall mycluster -n default | datanode.storage.storageRetainPolicy | string | `"Retain"` | Storage retain policy for datanode persistent volume | | datanode.storage.storageSize | string | `"10Gi"` | Storage size for datanode persistent volume | | datanode.storage.walDir | string | `"/data/greptimedb/wal"` | The wal directory of the storage, default is "/data/greptimedb/wal" | +| debugPod.enabled | bool | `false` | Enable debug pod | +| debugPod.image | object | `{"registry":"docker.io","repository":"greptime/greptime-tool","tag":"20240905-67eaa147"}` | The debug pod image | +| debugPod.resources | object | `{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"50m","memory":"64Mi"}}` | The debug pod resource | | flownode | object | `{"configData":"","configFile":"","enabled":false,"podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1}` | Flownode configure. **It's NOT READY YET** | | flownode.configData | string | `""` | Extra raw toml config data of flownode. Skip if the `configFile` is used. | | flownode.configFile | string | `""` | Extra toml file of flownode. | @@ -174,7 +177,7 @@ helm uninstall mycluster -n default | image.tag | string | `"v0.9.2"` | The image tag | | initializer.registry | string | `"docker.io"` | Initializer image registry | | initializer.repository | string | `"greptime/greptimedb-initializer"` | Initializer image repository | -| initializer.tag | string | `"0.1.0-alpha.28"` | Initializer image tag | +| initializer.tag | string | `"v0.1.0-alpha.29"` | Initializer image tag | | meta | object | `{"configData":"","configFile":"","enableRegionFailover":false,"etcdEndpoints":"etcd.default.svc.cluster.local:2379","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"readinessProbe":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1,"storeKeyPrefix":""}` | Meta configure | | meta.configData | string | `""` | Extra raw toml config data of meta. Skip if the `configFile` is used. | | meta.configFile | string | `""` | Extra toml file of meta. | diff --git a/charts/greptimedb-cluster/templates/debug-depoyment.yaml b/charts/greptimedb-cluster/templates/debug-depoyment.yaml new file mode 100644 index 0000000..fac1a9a --- /dev/null +++ b/charts/greptimedb-cluster/templates/debug-depoyment.yaml @@ -0,0 +1,27 @@ +{{- if .Values.debugPod }} +{{- if .Values.debugPod.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-debug-pod + namespace: {{ .Release.Namespace }} + labels: + app: {{ .Release.Name }}-debug-pod +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Release.Name }}-debug-pod + template: + metadata: + labels: + app: {{ .Release.Name }}-debug-pod + spec: + containers: + - image: {{ printf "%s/%s:%s" .Values.debugPod.image.registry .Values.debugPod.image.repository .Values.debugPod.image.tag }} + name: {{ .Release.Name }}-debug-pod + {{- if .Values.debugPod.resources }} + resources: {{ toYaml .Values.debugPod.resources | nindent 12 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/greptimedb-cluster/values.yaml b/charts/greptimedb-cluster/values.yaml index f7d3eb3..51090ce 100644 --- a/charts/greptimedb-cluster/values.yaml +++ b/charts/greptimedb-cluster/values.yaml @@ -14,7 +14,7 @@ initializer: # -- Initializer image repository repository: greptime/greptimedb-initializer # -- Initializer image tag - tag: 0.1.0-alpha.28 + tag: v0.1.0-alpha.29 base: # -- The pod template for base @@ -466,3 +466,22 @@ auth: users: - username: "admin" password: "admin" + +debugPod: + # -- Enable debug pod + enabled: false + + # -- The debug pod image + image: + registry: docker.io + repository: greptime/greptime-tool + tag: "20240905-67eaa147" + + # -- The debug pod resource + resources: + requests: + memory: 64Mi + cpu: 50m + limits: + memory: 256Mi + cpu: 200m