Skip to content

Commit

Permalink
feat: add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Oct 13, 2023
1 parent 423c229 commit 08aae78
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 32 deletions.
1 change: 1 addition & 0 deletions .github/chart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ chart-dirs:
charts:
- charts/greptimedb-operator
- charts/greptimedb
- charts/greptimedb-standalone
20 changes: 20 additions & 0 deletions charts/greptimedb-standalone/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Overview

Helm chart for [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) standalone mode.

## How to install

```console
# Add charts repo.
helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update

# Install greptimedb in default namespace.
helm install greptimedb greptime/greptimedb-standalone -n default --devel
```

## How to uninstall

```console
helm uninstall greptimedb -n default
```
20 changes: 10 additions & 10 deletions charts/greptimedb-standalone/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: 4000
targetPort: 4000
port: {{ .Values.httpPort }}
targetPort: {{ .Values.httpPort }}
protocol: TCP
- name: grpc
port: 4001
targetPort: 4001
port: {{ .Values.grpcPort }}
targetPort: {{ .Values.grpcPort }}
protocol: TCP
- name: mysql
port: 4002
targetPort: 4002
port: {{ .Values.mysqlPort }}
targetPort: {{ .Values.mysqlPort }}
protocol: TCP
- name: postgres
port: 4003
targetPort: 4003
port: {{ .Values.postgresPort }}
targetPort: {{ .Values.postgresPort }}
protocol: TCP
- name: prom
port: 4004
targetPort: 4004
port: {{ .Values.promPort }}
targetPort: {{ .Values.promPort }}
protocol: TCP
selector:
{{- include "greptimedb.selectorLabels" . | nindent 4 }}
19 changes: 11 additions & 8 deletions charts/greptimedb-standalone/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,27 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- containerPort: 4000
- containerPort: {{ .Values.httpPort }}
name: http
protocol: TCP
- containerPort: 4001
- containerPort: {{ .Values.grpcPort }}
name: grpc
protocol: TCP
- containerPort: 4002
- containerPort: {{ .Values.mysqlPort }}
name: mysql
protocol: TCP
- containerPort: 4003
- containerPort: {{ .Values.postgresPort }}
name: postgres
protocol: TCP
- containerPort: 4004
- containerPort: {{ .Values.promPort }}
name: prom
protocol: TCP
{{- with .Values.env }}
{{- if .Values.env }}
env:
{{- toYaml . | nindent 12 }}
{{- range $key, $val := .Values.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- with .Values.envFrom }}
envFrom:
Expand All @@ -91,7 +94,7 @@ spec:
{{- end }}
volumeMounts:
- name: data
mountPath: /data
mountPath: /tmp/greptimedb
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
36 changes: 22 additions & 14 deletions charts/greptimedb-standalone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,44 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

# Command to execute instead of defined in Docker image
command: [
"greptime", "standalone", "start"
]

# Additional cli args
args: []

# Environment variables
env: []
# GREPTIMEDB_STANDALONE__HTTP_OPTIONS__ADDR: "0.0.0.0:4000"
# GREPTIMEDB_STANDALONE__HTTP_OPTIONS__TIMEOUT: "120s"
# GREPTIMEDB_STANDALONE__PROM_OPTIONS__ADDR: "0.0.0.0:4004"
env:
GREPTIMEDB_STANDALONE__HTTP_OPTIONS__ADDR: "0.0.0.0:4000"
GREPTIMEDB_STANDALONE__HTTP_OPTIONS__TIMEOUT: "120s"
GREPTIMEDB_STANDALONE__PROM_OPTIONS__ADDR: "0.0.0.0:4004"

# GREPTIMEDB_STANDALONE__WAL__FILE_SIZE: "128MB"
# GREPTIMEDB_STANDALONE__WAL__PURGE_THRESHOLD: "2GB"
#
# GREPTIMEDB_STANDALONE__STORAGE__TYPE: "File"
# # Temporary put this in another directory to clear the database's data.
# GREPTIMEDB_STANDALONE__STORAGE__DATA_HOME: "/tmp/greptimedb/data"
#
# # GREPTIMEDB_STANDALONE__STORAGE__TYPE: "S3"
# # GREPTIMEDB_STANDALONE__STORAGE__BUCKET: "bucket-name"
# # GREPTIMEDB_STANDALONE__STORAGE__ROOT: "/data"
# # GREPTIMEDB_STANDALONE__STORAGE__REGION: "ap-southeast-1"
#
# GREPTIMEDB_STANDALONE__STORAGE__CACHE_PATH: "/tmp/greptimedb/s3cache"
# GREPTIMEDB_DATANODE__WAL__DIR: "/tmp/greptimedb/wal"
# GREPTIMEDB_STANDALONE__STORAGE__GLOBAL_TTL: "1d"
# GREPTIMEDB_STANDALONE__STORAGE__MANIFEST__CHECKPOINT_ON_STARTUP: "true"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__REGION_WRITE_BUFFER_SIZE: "256MB"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__REGION_WRITE_BUFFER_SIZE: "1MB"
# GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "512MB"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "300MB"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "100MB"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__REGION_WRITE_BUFFER_SIZE: "256MB"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__AUTO_FLUSH_INTERVAL: "5m"
# # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__MAX_FLUSH_TASKS: "2"
# # GREPTIMEDB_STANDALONE__STORAGE__COMPACTION__MAX_INFLIGHT_TASKS: "2"
# MALLOC_CONF: "prof:true"
# # GREPTIMEDB_STANDALONE__STORAGE__SKIP_WAL: "true"
# # GREPTIMEDB_DATANODE__STORAGE__MANIFEST__CHECKPOINT_MARGIN: "100"
# # GREPTIMEDB_DATANODE__STORAGE__MANIFEST__GC_DURATION: "5m"


# Environment variables
envFrom: {}
# - secretRef:
# name: config
Expand Down Expand Up @@ -153,14 +154,21 @@ persistence:
selector: null

monitoring:
enabled: false
enabled: true
# PodMonitor annotations
annotations: {}
# PodMonitor labels
labels: {}
labels:
release: prometheus
# PodMonitor scrape interval
interval: 15s

httpPort: 4000
grpcPort: 4001
mysqlPort: 4002
postgresPort: 4003
promPort: 4004

service:
type: ClusterIP
# Annotations for Service
Expand Down

0 comments on commit 08aae78

Please sign in to comment.