Skip to content

Commit

Permalink
feat(greptimedb-cluster): add debug pod (#163)
Browse files Browse the repository at this point in the history
* feat(greptimedb-cluster): add debug pod

* chore: rename debug pod

* chore: rename debug pod

* chore: update docs
  • Loading branch information
daviderli614 authored Sep 5, 2024
1 parent 3a3ae3b commit 203e7a5
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/greptimedb-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions charts/greptimedb-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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. |
Expand Down Expand Up @@ -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. |
Expand Down
27 changes: 27 additions & 0 deletions charts/greptimedb-cluster/templates/debug-depoyment.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
21 changes: 20 additions & 1 deletion charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 203e7a5

Please sign in to comment.