Skip to content

Commit

Permalink
feat: add values explanation (#76)
Browse files Browse the repository at this point in the history
* feat: add values explanation

* refactor: move greptimedb to greptimedb-cluster chart

* feat: add more parameter description

* chore: change chart test dir

* refactor: use helm-docs tool generates values
  • Loading branch information
daviderli614 authored Oct 20, 2023
1 parent 7610d07 commit a0eefbd
Show file tree
Hide file tree
Showing 16 changed files with 343 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/chart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ chart-dirs:
- charts
charts:
- charts/greptimedb-operator
- charts/greptimedb
- charts/greptimedb-cluster
- charts/greptimedb-standalone
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ If you want to deploy the GreptimeDB cluster, you can use the following command(
2. **Deploy GreptimeDB operator**

```console
helm install greptimedb-operator greptime/greptimedb-operator -n default --devel
helm install greptimedb-operator greptime/greptimedb-operator -n default
```


3. **Deploy GreptimeDB cluster**

```console
helm install mycluster greptime/greptimedb-cluster -n default --devel
helm install mycluster greptime/greptimedb-cluster -n default
```

If you already have the etcd cluster, you can configure the `etcdEndpoints`
Expand Down
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.0
version: 0.1.1
appVersion: 0.4.1
49 changes: 46 additions & 3 deletions charts/greptimedb-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Overview
# greptimedb-cluster

Helm chart for [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) cluster.
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.1](https://img.shields.io/badge/AppVersion-0.4.1-informational?style=flat-square)

A Helm chart for deploying GreptimeDB cluster in Kubernetes

## How to install

Expand All @@ -10,21 +12,62 @@ Helm chart for [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) cluster.
# Add charts repo.
helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update
```

```console
# Optional: Install etcd cluster.
# You also can use your own etcd cluster.
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
```

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

## How to uninstall

```console
helm uninstall greptimedb-cluster -n default
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| datanode.componentSpec | object | `{}` | Datanode componentSpec |
| datanode.replicas | int | `3` | Datanode replicas |
| datanode.storage.storageClassName | string | `nil` | Storage class for datanode persistent volume |
| 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 | `"/tmp/greptimedb/wal"` | The wal directory of the storage, default is "/tmp/greptimedb/wal". |
| frontend.componentSpec | object | `{}` | Frontend componentSpec |
| frontend.replicas | int | `1` | Frontend replicas |
| frontend.service | object | `{}` | Frontend service |
| frontend.tls | object | `{}` | Frontend tls Configure |
| grpcServicePort | int | `4001` | GreptimeDB grpc service port |
| httpServicePort | int | `4000` | GreptimeDB http service port |
| image.pullSecrets | list | `[]` | The image pull secrets. |
| image.registry | string | `"docker.io"` | The image registry |
| image.repository | string | `"greptime/greptimedb"` | The image repository |
| image.tag | string | `"v0.4.1"` | 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.17"` | Initializer image tag |
| meta.componentSpec | object | `{}` | Meta componentSpec |
| meta.etcdEndpoints | string | `"etcd.default.svc.cluster.local:2379"` | Meta etcd endpoints |
| meta.replicas | int | `1` | Meta replicas |
| mysqlServicePort | int | `4002` | GreptimeDB mysql service port |
| openTSDBServicePort | int | `4242` | GreptimeDB opentsdb service port |
| postgresServicePort | int | `4003` | GreptimeDB postgres service port |
| prometheusMonitor | object | `{}` | Configure to prometheus podmonitor |
| resources.limits | object | `{"cpu":"500m","memory":"512Mi"}` | The resources limits for the container |
| resources.requests | object | `{"cpu":"500m","memory":"512Mi"}` | The requested resources for the container |
| storage | object | `{"local":{},"oss":{},"s3":{}}` | Configure to Storage |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
32 changes: 32 additions & 0 deletions charts/greptimedb-cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Helm chart for [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) cluster.

## How to install

**Note**: Make sure you already install the [greptimedb-operator](../greptimedb-operator/README.md).

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

```console
# Optional: Install etcd cluster.
# You also can use your own etcd cluster.
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
```

```console
# Install greptimedb in default namespace.
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
```

## How to uninstall

```console
helm uninstall greptimedb-cluster -n default
```
4 changes: 2 additions & 2 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ spec:
{{- end }}
meta:
replicas: {{ .Values.meta.replicas }}
{{- if .Values.etcdEndpoints }}
{{- if .Values.meta.etcdEndpoints }}
etcdEndpoints:
- {{ .Values.etcdEndpoints }}
- {{ .Values.meta.etcdEndpoints }}
{{- end }}
{{- if .Values.meta.componentSpec }}
template: {{- toYaml .Values.meta.componentSpec | nindent 6 }}
Expand Down
53 changes: 39 additions & 14 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
image:
# -- The image registry
registry: docker.io
# The image repository
# -- The image repository
repository: greptime/greptimedb
# The image tag
# -- The image tag
tag: "v0.4.1"
# The image pull secrets.
# -- The image pull secrets.
pullSecrets: []

resources:
# -- The requested resources for the container
requests:
cpu: 500m
memory: 512Mi
# -- The resources limits for the container
limits:
cpu: 500m
memory: 512Mi

frontend:
# -- Frontend replicas
replicas: 1
# -- Frontend service
service: {}
# -- Frontend componentSpec
componentSpec: {}

# -- Frontend tls Configure
tls: {}
# certificates:
# secretName: greptimedb-frontend-tls
Expand All @@ -32,50 +39,70 @@ frontend:
# tls.key: ""

meta:
# -- Meta replicas
replicas: 1
# -- Meta etcd endpoints
etcdEndpoints: "etcd.default.svc.cluster.local:2379"
# -- Meta componentSpec
componentSpec: {}

datanode:
# -- Datanode replicas
replicas: 3
# -- Datanode componentSpec
componentSpec: {}
storage:
# -- Storage class for datanode persistent volume
storageClassName: null
# -- Storage size for datanode persistent volume
storageSize: 10Gi
# -- Storage retain policy for datanode persistent volume
storageRetainPolicy: Retain

# # The wal directory of the storage, default is "/tmp/greptimedb/wal".
# walDir: "/tmp/greptimedb/wal"
# -- The wal directory of the storage, default is "/tmp/greptimedb/wal".
walDir: "/tmp/greptimedb/wal"

initializer:
# -- Initializer image registry
registry: docker.io
# -- Initializer image repository
repository: greptime/greptimedb-initializer
# -- Initializer image tag
tag: 0.1.0-alpha.17

# The etcdEndpoints need be modified to the actual etcd cluster.
etcdEndpoints: "etcd.default.svc.cluster.local:2379"

# -- GreptimeDB http service port
httpServicePort: 4000

# -- GreptimeDB grpc service port
grpcServicePort: 4001

# -- GreptimeDB mysql service port
mysqlServicePort: 4002

# -- GreptimeDB postgres service port
postgresServicePort: 4003

# -- GreptimeDB opentsdb service port
openTSDBServicePort: 4242

# configure to prometheus podmonitor
# -- Configure to prometheus podmonitor
prometheusMonitor: {}
# enabled: true
# enabled: false
# path: "/metrics"
# port: "http"
# interval: "30s"
# honorLabels: true
# labelsSelector:
# release: prometheus

# -- Configure to Storage
storage:
# credentials:
# secretName: "credentials"

# secretCreation:
# # Create the raw secret.
# # Create the raw secret.
# enabled: true

# # Create the sealed secret.
# # If enableEncryption is true, the credentials should be encrypted.
# enableEncryption: false
Expand All @@ -94,7 +121,6 @@ storage:
# bucket: "bucket-name"
# region: "us-west-2"

# # The root directory of the cluster.
# # The data directory in S3 will be: 's3://<bucket>/<root>/data/...'.
# root: "mycluster"
# endpoint: "s3.us-west-2.amazonaws.com"
Expand All @@ -105,7 +131,6 @@ storage:
# bucket: "bucket-name"
# region: "cn-hangzhou"

# # The root directory of the cluster.
# # The data directory in OSS will be: 'oss://<bucket>/<root>/data/...'.
# root: "mycluster"
# endpoint: "oss-cn-hangzhou.aliyuncs.com"
Expand Down
4 changes: 3 additions & 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.1-alpha.14
version: 0.1.1
type: application
home: https://github.com/GreptimeTeam/greptimedb-operator
sources:
Expand All @@ -15,5 +15,7 @@ keywords:
maintainers:
- name: daviderli614
email: [email protected]
url: https://github.com/daviderli614
- name: zyy17
email: [email protected]
url: https://github.com/zyy17
49 changes: 45 additions & 4 deletions charts/greptimedb-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# Overview
# greptimedb-operator

Helm chart for GreptimeDB [operator](https://github.com/GreptimeTeam/greptimedb-operator).
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-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)

The greptimedb-operator Helm chart for Kubernetes

**Homepage:** <https://github.com/GreptimeTeam/greptimedb-operator>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| daviderli614 | <[email protected]> | <https://github.com/daviderli614> |
| zyy17 | <[email protected]> | <https://github.com/zyy17> |

## Source Code

* <https://github.com/GreptimeTeam/greptimedb-operator>

## Requirements

Kubernetes: `>=1.18.0-0`

## How to install

Expand All @@ -12,10 +31,10 @@ helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update

# Search charts repo.
helm search repo greptime -l --devel
helm search repo greptime -l --devel

# Deploy greptimedb-operator in default namespace.
helm install greptimedb-operator greptime/greptimedb-operator -n default --devel
helm install greptimedb-operator greptime/greptimedb-operator -n default

# Specifiy the chart version.
helm install greptimedb-operator greptime/greptimedb-operator -n default --version <chart-version>
Expand All @@ -26,3 +45,25 @@ helm install greptimedb-operator greptime/greptimedb-operator -n default --versi
```console
helm uninstall greptimedb-operator -n default
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| fullnameOverride | string | `""` | Provide a name to substitute for the full names of resources |
| image.imagePullPolicy | string | `"IfNotPresent"` | The image pull policy for the controller |
| image.pullSecrets | list | `[]` | The image pull secrets. |
| image.registry | string | `"docker.io"` | The image registry |
| image.repository | string | `"greptime/greptimedb-operator"` | The image repository |
| image.tag | string | `"0.1.0-alpha.17"` | The image tag |
| nameOverride | string | `""` | String to partially override release template name |
| nodeSelector | object | `{}` | The operator node selector |
| rbac.create | bool | `true` | Install Role Based Access Control |
| replicas | int | `1` | Number of replicas for the greptimedb operator |
| resources | object | `{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | Default resources for greptimedb operator |
| 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 | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
Loading

0 comments on commit a0eefbd

Please sign in to comment.