Skip to content

Commit

Permalink
refactor(greptimedb-cluster): rename object storage secretName (#112)
Browse files Browse the repository at this point in the history
* refactor(greptimedb-cluster): rename object storage secretName

* chore: update docs

* chore: change serviceaccount field name
  • Loading branch information
daviderli614 authored Feb 22, 2024
1 parent 0546f3f commit 9ebcf24
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ If you want to deploy the GreptimeDB cluster, you can use the following command(
--set objectStorage.s3.bucket="your-bucket" \
--set objectStorage.s3.region="region-of-bucket" \
--set objectStorage.s3.root="root-directory-of-data" \
--set objectStorage.credentials.secretName="s3-credentials" \
--set objectStorage.credentials.accessKeyId="your-access-key-id" \
--set objectStorage.credentials.secretAccessKey="your-secret-access-key" \
-n default
Expand Down
8 changes: 7 additions & 1 deletion charts/greptimedb-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ apiVersion: v2
name: greptimedb-cluster
description: A Helm chart for deploying GreptimeDB cluster in Kubernetes
type: application
version: 0.1.15
version: 0.1.16
appVersion: 0.6.0
home: https://github.com/GreptimeTeam/greptimedb
sources:
- https://github.com/GreptimeTeam/greptimedb
keywords:
- database
- greptimedb
maintainers:
- name: daviderli614
email: [email protected]
Expand Down
11 changes: 5 additions & 6 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.15](https://img.shields.io/badge/Version-0.1.15-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.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)

## Source Code

Expand Down Expand Up @@ -41,7 +41,6 @@ helm upgrade --install mycluster greptime/greptimedb-cluster \
--set objectStorage.s3.bucket="your-bucket" \
--set objectStorage.s3.region="region-of-bucket" \
--set objectStorage.s3.root="root-directory-of-data" \
--set objectStorage.credentials.secretName="s3-credentials" \
--set objectStorage.credentials.accessKeyId="your-access-key-id" \
--set objectStorage.credentials.secretAccessKey="your-secret-access-key" \
-n default
Expand Down Expand Up @@ -78,9 +77,9 @@ 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":{}}},"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.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":{}}},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[]}` | 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. |
Expand All @@ -92,8 +91,8 @@ helm uninstall mycluster -n default
| 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.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.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.replicas | int | `3` | Datanode replicas |
| datanode.storage.dataHome | string | `"/data/greptimedb"` | The dataHome directory, default is "/data/greptimedb/" |
Expand Down
1 change: 0 additions & 1 deletion charts/greptimedb-cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ helm upgrade --install mycluster greptime/greptimedb-cluster \
--set objectStorage.s3.bucket="your-bucket" \
--set objectStorage.s3.region="region-of-bucket" \
--set objectStorage.s3.root="root-directory-of-data" \
--set objectStorage.credentials.secretName="s3-credentials" \
--set objectStorage.credentials.accessKeyId="your-access-key-id" \
--set objectStorage.credentials.secretAccessKey="your-secret-access-key" \
-n default
Expand Down
6 changes: 3 additions & 3 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ spec:
{{- if .Values.datanode.podTemplate.labels }}
labels: {{ .Values.datanode.podTemplate.labels | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.datanode.podTemplate.serviceaccount.create }}
{{- if .Values.datanode.podTemplate.serviceAccount.create }}
serviceAccountName: {{ .Release.Name }}-datanode
{{- end }}
{{- if .Values.datanode.podTemplate.tolerations }}
Expand Down Expand Up @@ -202,14 +202,14 @@ spec:
bucket: {{ .Values.objectStorage.s3.bucket }}
region: {{ .Values.objectStorage.s3.region }}
root: {{ .Values.objectStorage.s3.root }}
secretName: {{ .Values.objectStorage.credentials.secretName }}
secretName: {{ .Release.Name }}-secret
endpoint: {{ .Values.objectStorage.s3.endpoint }}
{{- else if .Values.objectStorage.oss }}
oss:
bucket: {{ .Values.objectStorage.oss.bucket }}
region: {{ .Values.objectStorage.oss.region }}
root: {{ .Values.objectStorage.oss.root }}
secretName: {{ .Values.objectStorage.credentials.secretName }}
secretName: {{ .Release.Name }}-secret
endpoint: {{ .Values.objectStorage.oss.endpoint }}
{{- else }}
{}
Expand Down
2 changes: 1 addition & 1 deletion charts/greptimedb-cluster/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- if .Values.objectStorage.credentials }}
apiVersion: v1
metadata:
name: {{ .Values.objectStorage.credentials.secretName }}
name: {{ .Release.Name }}-secret
namespace: {{ .Release.Namespace }}
kind: Secret
type: Opaque
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{- if .Values.datanode.podTemplate.serviceaccount.create }}
{{- if .Values.datanode.podTemplate.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}-datanode
namespace: {{ .Release.Namespace }}
{{- with .Values.datanode.podTemplate.serviceaccount.annotations }}
{{- with .Values.datanode.podTemplate.serviceAccount.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
3 changes: 1 addition & 2 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ datanode:
tolerations: []
# -- The pod affinity
affinity: {}
serviceaccount:
serviceAccount:
# -- Create a service account
create: false
# -- The annotations for datanode serviceaccount
Expand Down Expand Up @@ -249,7 +249,6 @@ prometheusMonitor:
# -- Configure to object storage
objectStorage:
# credentials:
# secretName: "credentials"
# accessKeyId: "you-should-set-the-access-key-id-here"
# secretAccessKey: "you-should-set-the-secret-access-key-here"

Expand Down

0 comments on commit 9ebcf24

Please sign in to comment.