Skip to content

Commit

Permalink
chore(greptimedb-cluster): define volumes and volumeMounts field (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 authored Feb 22, 2024
1 parent 9ebcf24 commit 0a5636f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 11 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,7 +2,7 @@ apiVersion: v2
name: greptimedb-cluster
description: A Helm chart for deploying GreptimeDB cluster in Kubernetes
type: application
version: 0.1.16
version: 0.1.17
appVersion: 0.6.0
home: https://github.com/GreptimeTeam/greptimedb
sources:
Expand Down
26 changes: 16 additions & 10 deletions 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.16](https://img.shields.io/badge/Version-0.1.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square)
![Version: 0.1.17](https://img.shields.io/badge/Version-0.1.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square)

## Source Code

Expand Down Expand Up @@ -77,45 +77,49 @@ helm uninstall mycluster -n default
| base.podTemplate.nodeSelector | object | `{}` | The pod node selector |
| base.podTemplate.serviceAccountName | string | `""` | The global service account |
| base.podTemplate.tolerations | list | `[]` | The pod tolerations |
| datanode | object | `{"config":"","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[]},"replicas":3,"storage":{"dataHome":"/data/greptimedb","storageClassName":null,"storageRetainPolicy":"Retain","storageSize":"10Gi","walDir":"/data/greptimedb/wal"}}` | Datanode configure |
| datanode | object | `{"config":"","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":3,"storage":{"dataHome":"/data/greptimedb","storageClassName":null,"storageRetainPolicy":"Retain","storageSize":"10Gi","walDir":"/data/greptimedb/wal"}}` | Datanode configure |
| datanode.config | string | `""` | Extra datanode config in toml format. |
| datanode.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[]}` | The pod template for datanode |
| datanode.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]}` | The pod template for datanode |
| datanode.podTemplate.affinity | object | `{}` | The pod affinity |
| datanode.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. |
| datanode.podTemplate.labels | object | `{}` | The labels to be created to the pod. |
| datanode.podTemplate.main | object | `{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}}` | The spec of main container |
| datanode.podTemplate.main | object | `{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]}` | The spec of main container |
| datanode.podTemplate.main.args | list | `[]` | The arguments to be passed to the command |
| datanode.podTemplate.main.command | list | `[]` | The command to be executed in the container |
| datanode.podTemplate.main.env | list | `[]` | The environment variables for the container |
| datanode.podTemplate.main.image | string | `""` | The datanode image. |
| datanode.podTemplate.main.resources.limits | object | `{}` | The resources limits for the container |
| datanode.podTemplate.main.resources.requests | object | `{}` | The requested resources for the container |
| datanode.podTemplate.main.volumeMounts | list | `[]` | The pod volumeMounts |
| datanode.podTemplate.nodeSelector | object | `{}` | The pod node selector |
| datanode.podTemplate.serviceAccount.annotations | object | `{}` | The annotations for datanode serviceaccount |
| datanode.podTemplate.serviceAccount.create | bool | `false` | Create a service account |
| datanode.podTemplate.tolerations | list | `[]` | The pod tolerations |
| datanode.podTemplate.volumes | list | `[]` | The pod volumes |
| datanode.replicas | int | `3` | Datanode replicas |
| datanode.storage.dataHome | string | `"/data/greptimedb"` | The dataHome directory, default is "/data/greptimedb/" |
| 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 | `"/data/greptimedb/wal"` | The wal directory of the storage, default is "/data/greptimedb/wal" |
| frontend | object | `{"config":"","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}},"nodeSelector":{},"serviceAccountName":"","tolerations":[]},"replicas":1,"service":{},"tls":{}}` | Frontend configure |
| frontend | object | `{"config":"","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccountName":"","tolerations":[],"volumes":[]},"replicas":1,"service":{},"tls":{}}` | Frontend configure |
| frontend.config | string | `""` | Extra frontend config in toml format. |
| frontend.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}},"nodeSelector":{},"serviceAccountName":"","tolerations":[]}` | The pod template for frontend |
| frontend.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccountName":"","tolerations":[],"volumes":[]}` | The pod template for frontend |
| frontend.podTemplate.affinity | object | `{}` | The pod affinity |
| frontend.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. |
| frontend.podTemplate.labels | object | `{}` | The labels to be created to the pod. |
| frontend.podTemplate.main | object | `{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}}` | The spec of main container |
| frontend.podTemplate.main | object | `{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]}` | The spec of main container |
| frontend.podTemplate.main.args | list | `[]` | The arguments to be passed to the command |
| frontend.podTemplate.main.command | list | `[]` | The command to be executed in the container |
| frontend.podTemplate.main.env | list | `[]` | The environment variables for the container |
| frontend.podTemplate.main.image | string | `""` | The frontend image. |
| frontend.podTemplate.main.resources.limits | object | `{}` | The resources limits for the container |
| frontend.podTemplate.main.resources.requests | object | `{}` | The requested resources for the container |
| frontend.podTemplate.main.volumeMounts | list | `[]` | The pod volumeMounts |
| frontend.podTemplate.nodeSelector | object | `{}` | The pod node selector |
| frontend.podTemplate.serviceAccountName | string | `""` | The service account for frontend |
| frontend.podTemplate.tolerations | list | `[]` | The pod tolerations |
| frontend.podTemplate.volumes | list | `[]` | The pod volumes |
| frontend.replicas | int | `1` | Frontend replicas |
| frontend.service | object | `{}` | Frontend service |
| frontend.tls | object | `{}` | Frontend tls configure |
Expand All @@ -128,23 +132,25 @@ helm uninstall mycluster -n default
| initializer.registry | string | `"docker.io"` | Initializer image registry |
| initializer.repository | string | `"greptime/greptimedb-initializer"` | Initializer image repository |
| initializer.tag | string | `"0.1.0-alpha.22"` | Initializer image tag |
| meta | object | `{"config":"","etcdEndpoints":"etcd.default.svc.cluster.local:2379","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}},"nodeSelector":{},"serviceAccountName":"","tolerations":[]},"replicas":1,"storeKeyPrefix":""}` | Meta configure |
| meta | object | `{"config":"","etcdEndpoints":"etcd.default.svc.cluster.local:2379","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccountName":"","tolerations":[],"volumes":[]},"replicas":1,"storeKeyPrefix":""}` | Meta configure |
| meta.config | string | `""` | Extra Meta config in toml format. |
| meta.etcdEndpoints | string | `"etcd.default.svc.cluster.local:2379"` | Meta etcd endpoints |
| meta.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}},"nodeSelector":{},"serviceAccountName":"","tolerations":[]}` | The pod template for meta |
| meta.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccountName":"","tolerations":[],"volumes":[]}` | The pod template for meta |
| meta.podTemplate.affinity | object | `{}` | The pod affinity |
| meta.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. |
| meta.podTemplate.labels | object | `{}` | The labels to be created to the pod. |
| meta.podTemplate.main | object | `{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}}}` | The spec of main container |
| meta.podTemplate.main | object | `{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]}` | The spec of main container |
| meta.podTemplate.main.args | list | `[]` | The arguments to be passed to the command |
| meta.podTemplate.main.command | list | `[]` | The command to be executed in the container |
| meta.podTemplate.main.env | list | `[]` | The environment variables for the container |
| meta.podTemplate.main.image | string | `""` | The meta image. |
| meta.podTemplate.main.resources.limits | object | `{}` | The resources limits for the container |
| meta.podTemplate.main.resources.requests | object | `{}` | The requested resources for the container |
| meta.podTemplate.main.volumeMounts | list | `[]` | The pod volumeMounts |
| meta.podTemplate.nodeSelector | object | `{}` | The pod node selector |
| meta.podTemplate.serviceAccountName | string | `""` | The service account for meta |
| meta.podTemplate.tolerations | list | `[]` | The pod tolerations |
| meta.podTemplate.volumes | list | `[]` | The pod volumes |
| meta.replicas | int | `1` | Meta replicas |
| meta.storeKeyPrefix | string | `""` | Meta will store data with this key prefix |
| mysqlServicePort | int | `4002` | GreptimeDB mysql service port |
Expand Down
18 changes: 18 additions & 0 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ spec:
{{- if .Values.frontend.podTemplate.main.env }}
env: {{- toYaml .Values.frontend.podTemplate.main.env | nindent 8 }}
{{- end }}
{{- if .Values.frontend.podTemplate.main.volumeMounts }}
volumeMounts: {{- toYaml .Values.frontend.podTemplate.main.volumeMounts | nindent 8 }}
{{- end }}
resources:
requests: {{ .Values.frontend.podTemplate.main.resources.requests | toYaml | nindent 12 }}
limits: {{ .Values.frontend.podTemplate.main.resources.limits | toYaml | nindent 12 }}
Expand All @@ -91,6 +94,9 @@ spec:
{{- if .Values.frontend.podTemplate.nodeSelector }}
nodeSelector: {{ .Values.frontend.podTemplate.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.frontend.podTemplate.volumes}}
volumes: {{ .Values.frontend.podTemplate.volumes | toYaml | nindent 8 }}
{{- end }}
meta:
replicas: {{ .Values.meta.replicas }}
{{- if .Values.meta.config }}
Expand Down Expand Up @@ -118,6 +124,9 @@ spec:
{{- if .Values.meta.podTemplate.main.env }}
env: {{- toYaml .Values.meta.podTemplate.main.env | nindent 8 }}
{{- end }}
{{- if .Values.meta.podTemplate.main.volumeMounts }}
volumeMounts: {{- toYaml .Values.meta.podTemplate.main.volumeMounts | nindent 8 }}
{{- end }}
resources:
requests: {{ .Values.meta.podTemplate.main.resources.requests | toYaml | nindent 12 }}
limits: {{ .Values.meta.podTemplate.main.resources.limits | toYaml | nindent 12 }}
Expand All @@ -139,6 +148,9 @@ spec:
{{- if .Values.meta.podTemplate.nodeSelector }}
nodeSelector: {{ .Values.meta.podTemplate.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.meta.podTemplate.volumes}}
volumes: {{ .Values.meta.podTemplate.volumes | toYaml | nindent 8 }}
{{- end }}
datanode:
replicas: {{ .Values.datanode.replicas }}
{{- if .Values.datanode.config }}
Expand All @@ -159,6 +171,9 @@ spec:
{{- if .Values.datanode.podTemplate.main.env }}
env: {{- toYaml .Values.datanode.podTemplate.main.env | nindent 8 }}
{{- end }}
{{- if .Values.datanode.podTemplate.main.volumeMounts }}
volumeMounts: {{- toYaml .Values.datanode.podTemplate.main.volumeMounts | nindent 8 }}
{{- end }}
resources:
requests: {{ .Values.datanode.podTemplate.main.resources.requests | toYaml | nindent 12 }}
limits: {{ .Values.datanode.podTemplate.main.resources.limits | toYaml | nindent 12 }}
Expand All @@ -180,6 +195,9 @@ spec:
{{- if .Values.datanode.podTemplate.nodeSelector }}
nodeSelector: {{ .Values.datanode.podTemplate.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.datanode.podTemplate.volumes}}
volumes: {{ .Values.datanode.podTemplate.volumes | toYaml | nindent 8 }}
{{- end }}
storage:
storageClassName: {{ .Values.datanode.storage.storageClassName }}
storageSize: {{ .Values.datanode.storage.storageSize }}
Expand Down
16 changes: 16 additions & 0 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ frontend:
# -- The arguments to be passed to the command
args: []

# -- The pod volumeMounts
volumeMounts: []

# -- The annotations to be created to the pod.
annotations: {}
# -- The labels to be created to the pod.
Expand All @@ -100,6 +103,8 @@ frontend:
affinity: {}
# -- The service account for frontend
serviceAccountName: ""
# -- The pod volumes
volumes: []

# -- Frontend service
service: {}
Expand Down Expand Up @@ -143,6 +148,9 @@ meta:
# -- The arguments to be passed to the command
args: []

# -- The pod volumeMounts
volumeMounts: []

# -- The annotations to be created to the pod.
annotations: {}
# -- The labels to be created to the pod.
Expand All @@ -155,6 +163,8 @@ meta:
affinity: {}
# -- The service account for meta
serviceAccountName: ""
# -- The pod volumes
volumes: []

# -- Meta etcd endpoints
etcdEndpoints: "etcd.default.svc.cluster.local:2379"
Expand Down Expand Up @@ -197,6 +207,9 @@ datanode:
# -- The arguments to be passed to the command
args: []

# -- The pod volumeMounts
volumeMounts: []

# -- The annotations to be created to the pod.
annotations: {}
# -- The labels to be created to the pod.
Expand All @@ -207,6 +220,9 @@ datanode:
tolerations: []
# -- The pod affinity
affinity: {}
# -- The pod volumes
volumes: []

serviceAccount:
# -- Create a service account
create: false
Expand Down

0 comments on commit 0a5636f

Please sign in to comment.