Skip to content

Commit

Permalink
refactor: use helm-docs tool generates values
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Oct 20, 2023
1 parent b4cf909 commit 93a4207
Show file tree
Hide file tree
Showing 12 changed files with 323 additions and 223 deletions.
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
129 changes: 41 additions & 88 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 @@ -24,7 +26,7 @@ helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \

```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
Expand All @@ -33,88 +35,39 @@ helm install greptimedb-cluster greptime/greptimedb-cluster -n default --devel
helm uninstall greptimedb-cluster -n default
```

## Parameters

### Common parameters

| Name | Description | Value |
|------------------------------------|-------------------------------------------|-----------------------------------|
| `image.registry` | Image registry | `docker.io` |
| `image.repository` | Image name | `greptime/greptimedb` |
| `image.tag` | Image tag | `v0.4.1` |
| `image.pullSecrets` | Docker registry secret names as an array | `[]` |
| `resources.limits` | The resources limits for the container | `{}` |
| `resources.requests` | The requested resources for the container | `{}` |
| `initializer.registry` | Initializer image registry | `docker.io` |
| `initializer.repository` | Initializer image repository | `greptime/greptimedb-initializer` |
| `initializer.tag` | Initializer image tag | `0.1.0-alpha.17` |
| `httpServicePort` | GreptimeDB http port | `4000` |
| `grpcServicePort` | GreptimeDB grpc port | `4001` |
| `mysqlServicePort` | GreptimeDB mysql port | `4002` |
| `postgresServicePort` | GreptimeDB postgres port | `4003` |
| `openTSDBServicePort` | GreptimeDB opentsdb port | `4242` |


### Frontend parameters

| Name | Description | Value |
|-------------------------------------------------------------|------------------------------------------|---------|
| `frontend.replicas` | Frontend replicas | `1` |
| `frontend.service` | Frontend service | `{}` |
| `frontend.componentSpec` | Frontend componentSpec | `{}` |
| `frontend.tls.certificates.secretName` | Frontend tls certificates secret name | `""` |
| `frontend.tls.certificates.secretCreation.enabled` | Create frontend tls certificates secret | `true` |
| `frontend.tls.certificates.secretCreation.enableEncryption` | Encrypt frontend tls certificates secret | `false` |
| `frontend.tls.certificates.secretCreation.data.ca.crt` | Frontend tls certificates ca.crt | `""` |
| `frontend.tls.certificates.secretCreation.data.tls.crt` | Frontend tls certificates tls.crt | `""` |
| `frontend.tls.certificates.secretCreation.data.tls.key` | Frontend tls certificates tls.key | `""` |

### Meta parameters

| Name | Description | Value |
|----------------------|---------------------|------------------------------------------|
| `meta.replicas` | Meta replicas | `1` |
| `meta.etcdEndpoints` | Meta etcd endpoints | `etcd.default.svc.cluster.local:2379` |
| `meta.componentSpec` | Meta componentSpec | `{}` |

### Datanode parameters

| Name | Description | Value |
|---------------------------------|------------------------------------------------------|----------|
| `datanode.replicas` | Datanode replicas | `1` |
| `datanode.componentSpec` | Datanode componentSpec | `{}` |
| `datanode.storageClassName` | Storage class for datanode persistent volume | `null` |
| `datanode.storageSize` | Storage size for datanode persistent volume | `10Gi` |
| `datanode.storageRetainPolicy` | Storage retain policy for datanode persistent volume | `Retain` |

### Storage parameters

| Name | Description | Value |
|-------------------------------------------------------------|------------------------------------------|-------------------|
| `storage.credentials.secretName` | Storage credentials secret name | `credentials` |
| `storage.credentials.secretCreation.enabled` | Create frontend tls certificates secret | `true` |
| `storage.credentials.secretCreation.enableEncryption` | Encrypt frontend tls certificates secret | `false` |
| `storage.credentials.secretCreation.data.access-key-id` | Storage credentials access key id | `""` |
| `storage.credentials.secretCreation.data.secret-access-key` | Storage credentials secret access key | `""` |
| `storage.local.directory` | Local storage directory | `/tmp/greptimedb` |
| `storage.s3.bucket` | S3 storage bucket name | `""` |
| `storage.s3.region` | S3 storage bucket region | `""` |
| `storage.s3.root` | S3 storage bucket root | `""` |
| `storage.s3.endpoint` | S3 storage bucket endpoint | `""` |
| `storage.s3.secretName` | S3 storage credentials secret | `""` |
| `storage.oss.bucket` | OSS storage bucket name | `""` |
| `storage.oss.region` | OSS storage bucket region | `""` |
| `storage.oss.root` | OSS storage bucket root | `""` |
| `storage.oss.endpoint` | OSS storage bucket endpoint | `""` |
| `storage.oss.secretName` | OSS storage bucket credentials secret | `""` |

### Metrics parameters

| Name | Description | Value |
|------------------------------------|-------------------------------------------------------------|------------|
| `prometheusMonitor.enabled` | Enable prometheus podmonitor | `false` |
| `prometheusMonitor.path` | HTTP path to scrape for metrics | `/metrics` |
| `prometheusMonitor.port` | Target metrics port | `http` |
| `prometheusMonitor.interval` | Scraped interval | `30s` |
| `prometheusMonitor.honorLabels` | Chooses the metrics labels on collisions with target labels | `true` |
| `prometheusMonitor.labelsSelector` | Prometheus podmonitor labels | `{}` |
## 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
```
47 changes: 37 additions & 10 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,33 +39,52 @@ 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

# -- 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: false
# path: "/metrics"
Expand All @@ -68,12 +94,15 @@ prometheusMonitor: {}
# 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 @@ -92,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 @@ -103,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.15
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
Loading

0 comments on commit 93a4207

Please sign in to comment.