Skip to content

Commit

Permalink
refactor: helm docs (#77)
Browse files Browse the repository at this point in the history
* refactor: helm docs

* chore: change standalone port values name

* feat: add 'make update-docs' command
  • Loading branch information
daviderli614 authored Oct 23, 2023
1 parent a0eefbd commit ec98564
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 80 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
HELM_DOCS_VERSION = v1.11.3

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif

.PHONY: install-helm-docs
install-helm-docs: ## Install helm-docs tool
go install github.com/norwoodj/helm-docs/cmd/helm-docs@${HELM_DOCS_VERSION}

.PHONY: update-docs
update-docs: install-helm-docs ## Run helm-docs
$(GOBIN)/helm-docs -c charts/greptimedb-cluster --chart-search-root=charts/greptimedb-cluster --template-files=README.md.gotmpl
$(GOBIN)/helm-docs -c charts/greptimedb-operator --chart-search-root=charts/greptimedb-operator --template-files=README.md.gotmpl
$(GOBIN)/helm-docs -c charts/greptimedb-standalone --chart-search-root=charts/greptimedb-standalone --template-files=README.md.gotmpl
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ If you want to deploy the GreptimeDB cluster, you can use the following command(
```console
helm install mycluster greptime/greptimedb-cluster \
--set etcdEndpoints=etcd.default:2379 \
-n default --devel
-n default
```

You also can list the current releases by `helm` command:
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.1
version: 0.1.2
appVersion: 0.4.1
18 changes: 9 additions & 9 deletions charts/greptimedb-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# 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

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-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)

## Source Code
- https://github.com/GreptimeTeam/greptimedb

## How to install

**Note**: Make sure you already install the [greptimedb-operator](../greptimedb-operator/README.md).
Expand Down Expand Up @@ -44,14 +47,14 @@ helm uninstall greptimedb-cluster -n default
| 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". |
| 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 |
| 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.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 |
Expand All @@ -67,7 +70,4 @@ helm uninstall greptimedb-cluster -n default
| 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)
| storage | object | `{"local":{},"oss":{},"s3":{}}` | Configure to storage |
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Helm chart for [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) cluster.
{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

## Source Code
- https://github.com/GreptimeTeam/greptimedb

## How to install

Expand Down Expand Up @@ -30,3 +36,7 @@ helm install greptimedb-cluster greptime/greptimedb-cluster -n default
```console
helm uninstall greptimedb-cluster -n default
```

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}
8 changes: 4 additions & 4 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ image:
repository: greptime/greptimedb
# -- The image tag
tag: "v0.4.1"
# -- The image pull secrets.
# -- The image pull secrets
pullSecrets: []

resources:
Expand All @@ -26,7 +26,7 @@ frontend:
# -- Frontend componentSpec
componentSpec: {}

# -- Frontend tls Configure
# -- Frontend tls configure
tls: {}
# certificates:
# secretName: greptimedb-frontend-tls
Expand Down Expand Up @@ -58,7 +58,7 @@ datanode:
storageSize: 10Gi
# -- Storage retain policy for datanode persistent volume
storageRetainPolicy: Retain
# -- The wal directory of the storage, default is "/tmp/greptimedb/wal".
# -- The wal directory of the storage, default is "/tmp/greptimedb/wal"
walDir: "/tmp/greptimedb/wal"

initializer:
Expand Down Expand Up @@ -94,7 +94,7 @@ prometheusMonitor: {}
# labelsSelector:
# release: prometheus

# -- Configure to Storage
# -- Configure to storage
storage:
# credentials:
# secretName: "credentials"
Expand Down
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.1
version: 0.1.2
type: application
home: https://github.com/GreptimeTeam/greptimedb-operator
sources:
Expand Down
29 changes: 8 additions & 21 deletions charts/greptimedb-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
# 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> |
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-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>

## Requirements

Kubernetes: `>=1.18.0-0`
- https://github.com/GreptimeTeam/greptimedb-operator

## How to install

Expand All @@ -46,24 +32,25 @@ helm install greptimedb-operator greptime/greptimedb-operator -n default --versi
helm uninstall greptimedb-operator -n default
```

## Requirements

Kubernetes: `>=1.18.0-0`

## 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.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 |
| 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)
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

# Overview

Helm chart for [greptimedb-operator](https://github.com/GreptimeTeam/greptimedb-operator).
## Source Code
- https://github.com/GreptimeTeam/greptimedb-operator

## How to install

Expand Down Expand Up @@ -35,5 +34,3 @@ helm uninstall greptimedb-operator -n default
{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
4 changes: 2 additions & 2 deletions charts/greptimedb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ image:
imagePullPolicy: IfNotPresent
# -- The image tag
tag: 0.1.0-alpha.17
# -- The image pull secrets.
# -- The image pull secrets
pullSecrets: []

serviceAccount:
Expand All @@ -34,7 +34,7 @@ resources:
memory: 128Mi

rbac:
# -- Install Role Based Access Control
# -- Install role based access control
create: true

# -- String to partially override release template name
Expand Down
4 changes: 2 additions & 2 deletions charts/greptimedb-standalone/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: greptimedb-standalone
description: A Helm chart for deploying standalone greptimedb.
description: A Helm chart for deploying standalone greptimedb
type: application
version: 0.1.0
version: 0.1.1
appVersion: 0.4.1
20 changes: 10 additions & 10 deletions charts/greptimedb-standalone/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# greptimedb-standalone

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-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 standalone greptimedb

A Helm chart for deploying standalone greptimedb.
![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)

## Source Code
- https://github.com/GreptimeTeam/greptimedb

## How to install

Expand Down Expand Up @@ -33,8 +36,8 @@ helm uninstall greptimedb-standalone -n default
| 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 |
| grpcPort | int | `4001` | GreptimeDB grpc port |
| httpPort | int | `4000` | GreptimeDB http port |
| grpcServicePort | int | `4001` | GreptimeDB grpc service port |
| httpServicePort | int | `4000` | GreptimeDB http service port |
| image.pullPolicy | string | `"IfNotPresent"` | The image pull policy for the controller |
| image.pullSecrets | list | `[]` | The image pull secrets. |
| image.registry | string | `"docker.io"` | The image registry |
Expand All @@ -44,7 +47,7 @@ helm uninstall greptimedb-standalone -n default
| monitoring.enabled | bool | `false` | Enable prometheus podmonitor |
| monitoring.interval | string | `"30s"` | PodMonitor scrape interval |
| monitoring.labels | object | `{}` | PodMonitor labels |
| mysqlPort | int | `4002` | GreptimeDB mysql port |
| mysqlServicePort | int | `4002` | GreptimeDB mysql service port |
| nameOverride | string | `""` | Overrides the chart's name |
| nodeSelector | object | `{}` | NodeSelector to apply pod |
| persistence.enableStatefulSetAutoDeletePVC | bool | `false` | Enable StatefulSetAutoDeletePVC feature |
Expand All @@ -55,16 +58,13 @@ helm uninstall greptimedb-standalone -n default
| podAnnotations | object | `{}` | Extra pod annotations to add |
| podLabels | object | `{}` | Extra pod labels to add |
| podSecurityContext | object | `{}` | Security context to apply to the pod |
| postgresPort | int | `4003` | GreptimeDB postgres port |
| postgresServicePort | int | `4003` | GreptimeDB postgres service port |
| resources | object | `{}` | Resource requests and limits for the container |
| securityContext | object | `{}` | Security context to apply to the container |
| service.annotations | object | `{}` | Annotations for Service |
| service.annotations | object | `{}` | Annotations for service |
| service.type | string | `"ClusterIP"` | Service type |
| 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 |
| tolerations | object | `{}` | Tolerations to apply pod |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Overview
{{ template "chart.header" . }}
{{ template "chart.description" . }}

Helm chart for [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) standalone mode.
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

## Source Code
- https://github.com/GreptimeTeam/greptimedb

## How to install

Expand All @@ -18,3 +22,7 @@ helm install greptimedb-standalone greptime/greptimedb-standalone -n default
```console
helm uninstall greptimedb-standalone -n default
```

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}
16 changes: 8 additions & 8 deletions charts/greptimedb-standalone/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.httpPort }}
targetPort: {{ .Values.httpPort }}
port: {{ .Values.httpServicePort }}
targetPort: {{ .Values.httpServicePort }}
protocol: TCP
- name: grpc
port: {{ .Values.grpcPort }}
targetPort: {{ .Values.grpcPort }}
port: {{ .Values.grpcServicePort }}
targetPort: {{ .Values.grpcServicePort }}
protocol: TCP
- name: mysql
port: {{ .Values.mysqlPort }}
targetPort: {{ .Values.mysqlPort }}
port: {{ .Values.mysqlServicePort }}
targetPort: {{ .Values.mysqlServicePort }}
protocol: TCP
- name: postgres
port: {{ .Values.postgresPort }}
targetPort: {{ .Values.postgresPort }}
port: {{ .Values.postgresServicePort }}
targetPort: {{ .Values.postgresServicePort }}
protocol: TCP
selector:
{{- include "greptimedb-standalone.selectorLabels" . | nindent 4 }}
8 changes: 4 additions & 4 deletions charts/greptimedb-standalone/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ spec:
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ .Values.httpPort }}
- containerPort: {{ .Values.httpServicePort }}
name: http
protocol: TCP
- containerPort: {{ .Values.grpcPort }}
- containerPort: {{ .Values.grpcServicePort }}
name: grpc
protocol: TCP
- containerPort: {{ .Values.mysqlPort }}
- containerPort: {{ .Values.mysqlServicePort }}
name: mysql
protocol: TCP
- containerPort: {{ .Values.postgresPort }}
- containerPort: {{ .Values.postgresServicePort }}
name: postgres
protocol: TCP
{{- if .Values.env }}
Expand Down
18 changes: 9 additions & 9 deletions charts/greptimedb-standalone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ monitoring:
# -- PodMonitor scrape interval
interval: 30s

# -- GreptimeDB http port
httpPort: 4000
# -- GreptimeDB grpc port
grpcPort: 4001
# -- GreptimeDB mysql port
mysqlPort: 4002
# -- GreptimeDB postgres port
postgresPort: 4003
# -- GreptimeDB http service port
httpServicePort: 4000
# -- GreptimeDB grpc service port
grpcServicePort: 4001
# -- GreptimeDB mysql service port
mysqlServicePort: 4002
# -- GreptimeDB postgres service port
postgresServicePort: 4003

service:
# -- Service type
type: ClusterIP
# -- Annotations for Service
# -- Annotations for service
annotations: {}

0 comments on commit ec98564

Please sign in to comment.