Skip to content

Commit

Permalink
refactor: standalone chart (#93)
Browse files Browse the repository at this point in the history
* refactor: standalone chart

* feat: add more in NOTES.txt

* chore: add datahome args

* chore: update docs

* chore: change wal and cache env
  • Loading branch information
daviderli614 authored Dec 22, 2023
1 parent 8be3618 commit b6446a5
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 33 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,5 +2,5 @@ apiVersion: v2
name: greptimedb-cluster
description: A Helm chart for deploying GreptimeDB cluster in Kubernetes
type: application
version: 0.1.6
version: 0.1.7
appVersion: 0.4.4
2 changes: 1 addition & 1 deletion 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.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.4](https://img.shields.io/badge/AppVersion-0.4.4-informational?style=flat-square)
![Version: 0.1.7](https://img.shields.io/badge/Version-0.1.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.4](https://img.shields.io/badge/AppVersion-0.4.4-informational?style=flat-square)

## Source Code

Expand Down
12 changes: 12 additions & 0 deletions charts/greptimedb-cluster/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
***********************************************************************
Welcome to use greptimedb-cluster
Chart version: {{ .Chart.Version }}
GreptimeDB Cluster version: {{ .Chart.AppVersion }}
***********************************************************************

Installed components:
* greptimedb-frontend
* greptimedb-datanode
* greptimedb-meta

The greptimedb-cluster is starting, use `kubectl get pod -n {{ .Release.Namespace }}` to check its status.
2 changes: 1 addition & 1 deletion charts/greptimedb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kubeVersion: ">=1.18.0-0"
description: The greptimedb-operator Helm chart for Kubernetes
name: greptimedb-operator
appVersion: 0.1.0-alpha.17
version: 0.1.3
version: 0.1.4
type: application
home: https://github.com/GreptimeTeam/greptimedb-operator
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/greptimedb-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The greptimedb-operator Helm chart for Kubernetes

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.17](https://img.shields.io/badge/AppVersion-0.1.0--alpha.17-informational?style=flat-square)
![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.17](https://img.shields.io/badge/AppVersion-0.1.0--alpha.17-informational?style=flat-square)

## Source Code
- https://github.com/GreptimeTeam/greptimedb-operator
Expand Down
9 changes: 9 additions & 0 deletions charts/greptimedb-operator/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
***********************************************************************
Welcome to use greptimedb-operator
Chart version: {{ .Chart.Version }}
GreptimeDB Operator version: {{ .Chart.AppVersion }}
***********************************************************************

Installed components:
* greptimedb-operator

The greptimedb-operator is starting, use `kubectl get deployments {{ include "greptimedb-operator.fullname" . }} -n {{ .Release.Namespace }}` to check its status.
2 changes: 1 addition & 1 deletion charts/greptimedb-standalone/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: greptimedb-standalone
description: A Helm chart for deploying standalone greptimedb
type: application
version: 0.1.5
version: 0.1.6
appVersion: 0.4.4
8 changes: 4 additions & 4 deletions charts/greptimedb-standalone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Helm chart for deploying standalone greptimedb

![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.4](https://img.shields.io/badge/AppVersion-0.4.4-informational?style=flat-square)
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.4](https://img.shields.io/badge/AppVersion-0.4.4-informational?style=flat-square)

## Source Code
- https://github.com/GreptimeTeam/greptimedb
Expand Down Expand Up @@ -32,8 +32,8 @@ helm uninstall greptimedb-standalone -n default
| annotations | object | `{}` | The annotations |
| args | list | `[]` | The container args |
| command | list | `[]` | The container command |
| configToml | string | `"mode = 'standalone'\n"` | The extra configuration for greptimedb. |
| dnsConfig | object | `{}` | DNS configuration for pod |
| configToml | string | `"mode = 'standalone'\n"` | The extra configuration for greptimedb |
| dataHome | string | `"/data/greptimedb/"` | Storage root directory |
| env | object | `{"GREPTIMEDB_STANDALONE__HTTP__ADDR":"0.0.0.0:4000"}` | Environment variables |
| envFrom | object | `{}` | Maps all the keys on a configmap or secret as environment variables |
| fullnameOverride | string | `""` | Provide a name to substitute for the full names of resources |
Expand Down Expand Up @@ -69,5 +69,5 @@ helm uninstall greptimedb-standalone -n default
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | Service account name |
| terminationGracePeriodSeconds | int | `30` | Grace period to allow the single binary to shutdown before it is killed |
| terminationGracePeriodSeconds | int | `30` | Grace period to allow the single binary to shut down before it is killed |
| tolerations | object | `{}` | Tolerations to apply pod |
10 changes: 10 additions & 0 deletions charts/greptimedb-standalone/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
***********************************************************************
Welcome to use greptimedb-standalone
Chart version: {{ .Chart.Version }}
GreptimeDB Standalone version: {{ .Chart.AppVersion }}
***********************************************************************

Installed components:
* greptimedb-standalone

The greptimedb-standalone is starting, use `kubectl get statefulsets {{ include "greptimedb-standalone.fullname" . }} -n {{ .Release.Namespace }}` to check its status.
8 changes: 4 additions & 4 deletions charts/greptimedb-standalone/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ spec:
- "--config-file"
- "/etc/greptimedb/config.toml"
{{- end }}
{{- if .Values.dataHome }}
- "--data-home"
- {{ .Values.dataHome }}
{{- end }}
{{- if .Values.args }}
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -122,10 +126,6 @@ spec:
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
42 changes: 22 additions & 20 deletions charts/greptimedb-standalone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ command: []
# -- The container args
args: []

# -- The extra configuration for greptimedb.
# -- The extra configuration for greptimedb
configToml: |
mode = 'standalone'
# -- Storage root directory
dataHome: "/data/greptimedb/"

# -- Environment variables
env:
GREPTIMEDB_STANDALONE__HTTP__ADDR: "0.0.0.0:4000"
Expand All @@ -47,20 +50,29 @@ env:

# GREPTIMEDB_STANDALONE__WAL__FILE_SIZE: "128MB"
# GREPTIMEDB_STANDALONE__WAL__PURGE_THRESHOLD: "2GB"
# GREPTIMEDB_DATANODE__WAL__DIR: "/tmp/greptimedb/wal"
# GREPTIMEDB_STANDALONE__WAL__DIR: "/data/greptimedb/wal"

# # configure to use local storage.
# GREPTIMEDB_STANDALONE__STORAGE__TYPE: "File"
# GREPTIMEDB_STANDALONE__STORAGE__DATA_HOME: "/tmp/greptimedb"

# # configure to use s3 storage.
# # configure to use aws s3 storage.
# GREPTIMEDB_STANDALONE__STORAGE__TYPE: "S3"
# GREPTIMEDB_STANDALONE__STORAGE__BUCKET: "bucket-name"
# GREPTIMEDB_STANDALONE__STORAGE__BUCKET: "aws_s3_name"
# GREPTIMEDB_STANDALONE__STORAGE__ROOT: "/data"
# GREPTIMEDB_STANDALONE__STORAGE__REGION: "aws_s3_region"
# GREPTIMEDB_STANDALONE__STORAGE__ACCESS_KEY_ID: "aws_access_key_id"
# GREPTIMEDB_STANDALONE__STORAGE__SECRET_ACCESS_KEY: "aws_secret_access_key"
# GREPTIMEDB_STANDALONE__STORAGE__CACHE_PATH: "/data/greptimedb/s3cache"

# # configure to use alicloud oss storage.
# GREPTIMEDB_STANDALONE__STORAGE__TYPE: "Oss"
# GREPTIMEDB_STANDALONE__STORAGE__BUCKET: "alicloud_oss_name"
# GREPTIMEDB_STANDALONE__STORAGE__ROOT: "/data"
# GREPTIMEDB_STANDALONE__STORAGE__REGION: "ap-southeast-1"
# GREPTIMEDB_STANDALONE__STORAGE__ACCESS_KEY_ID: "access_key_id"
# GREPTIMEDB_STANDALONE__STORAGE__SECRET_ACCESS_KEY: "secret_access_key"
# GREPTIMEDB_STANDALONE__STORAGE__CACHE__CACHE_PATH: "/tmp/greptimedb/s3cache"
# GREPTIMEDB_STANDALONE__STORAGE__REGION: "alicloud_oss_region"
# GREPTIMEDB_STANDALONE__STORAGE__ACCESS_KEY_ID: "alicloud_access_key_id"
# GREPTIMEDB_STANDALONE__STORAGE__ACCESS_KEY_SECRET: "alicloud_access_key_secret"
# GREPTIMEDB_STANDALONE__STORAGE__ENDPOINT: "alicloud_oss_endpoint" # For example: oss-cn-hangzhou.aliyuncs.com, more detail see https://www.alibabacloud.com/help/en/oss/user-guide/regions-and-endpoints
# GREPTIMEDB_STANDALONE__STORAGE__CACHE_PATH: "/data/greptimedb/osscache"

# GREPTIMEDB_STANDALONE__STORAGE__GLOBAL_TTL: "1d"
# GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "512MB"
Expand Down Expand Up @@ -138,17 +150,7 @@ affinity: {}
# values:
# - another-node-label-value

# -- DNS configuration for pod
dnsConfig: {}
# nameservers:
# - 10.0.0.1
# searches:
# - mydomain.local
# options:
# - name: ndots
# value: "2"

# -- Grace period to allow the single binary to shutdown before it is killed
# -- Grace period to allow the single binary to shut down before it is killed
terminationGracePeriodSeconds: 30

persistence:
Expand Down

0 comments on commit b6446a5

Please sign in to comment.