Skip to content

Commit 3a3ae3b

Browse files
authored
feat: add gcs configuration (#162)
* feat: add gcs configuration * feat: add gcs configuration
1 parent eb7e52f commit 3a3ae3b

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

charts/greptimedb-cluster/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: greptimedb-cluster
33
description: A Helm chart for deploying GreptimeDB cluster in Kubernetes.
44
type: application
5-
version: 0.2.8
5+
version: 0.2.9
66
appVersion: 0.9.2
77
home: https://github.com/GreptimeTeam/greptimedb
88
sources:

charts/greptimedb-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Helm chart for deploying GreptimeDB cluster in Kubernetes.
44

5-
![Version: 0.2.8](https://img.shields.io/badge/Version-0.2.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.2](https://img.shields.io/badge/AppVersion-0.9.2-informational?style=flat-square)
5+
![Version: 0.2.9](https://img.shields.io/badge/Version-0.2.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.2](https://img.shields.io/badge/AppVersion-0.9.2-informational?style=flat-square)
66

77
## Source Code
88

@@ -201,7 +201,7 @@ helm uninstall mycluster -n default
201201
| meta.replicas | int | `1` | Meta replicas |
202202
| meta.storeKeyPrefix | string | `""` | Meta will store data with this key prefix |
203203
| mysqlServicePort | int | `4002` | GreptimeDB mysql service port |
204-
| objectStorage | object | `{"oss":{},"s3":{}}` | Configure to object storage |
204+
| objectStorage | object | `{"gcs":{},"oss":{},"s3":{}}` | Configure to object storage |
205205
| postgresServicePort | int | `4003` | GreptimeDB postgres service port |
206206
| prometheusMonitor | object | `{"enabled":false,"interval":"30s","labels":{"release":"prometheus"}}` | Configure to prometheus PodMonitor |
207207
| prometheusMonitor.enabled | bool | `false` | Create PodMonitor resource for scraping metrics using PrometheusOperator |

charts/greptimedb-cluster/templates/cluster.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,17 @@ spec:
341341
{{- end }}
342342
{{- end }}
343343
{{- end }}
344+
{{- else if .Values.objectStorage.gcs }}
345+
gcs: {{- toYaml .Values.objectStorage.gcs | nindent 6 }}
346+
{{- if .Values.objectStorage }}
347+
{{- if .Values.objectStorage.credentials }}
348+
{{- if .Values.objectStorage.credentials.existingSecretName }}
349+
secretName: {{ .Values.objectStorage.credentials.existingSecretName }}
350+
{{- else }}
351+
secretName: {{ default "storage-credentials" .Values.objectStorage.credentials.secretName }}
352+
{{- end }}
353+
{{- end }}
354+
{{- end }}
344355
{{- else }}
345356
{}
346357
{{- end }}

charts/greptimedb-cluster/templates/secret.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ metadata:
77
namespace: {{ .Release.Namespace }}
88
kind: Secret
99
type: Opaque
10+
{{- if .Values.objectStorage.credentials.serviceAccountKey }}
11+
data:
12+
service-account-key: {{ .Values.objectStorage.credentials.serviceAccountKey }}
13+
{{- else }}
1014
stringData:
1115
access-key-id: {{ .Values.objectStorage.credentials.accessKeyId }}
1216
secret-access-key: {{ .Values.objectStorage.credentials.secretAccessKey }}
1317
{{- end }}
1418
{{- end }}
1519
{{- end }}
20+
{{- end }}

charts/greptimedb-cluster/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ objectStorage:
414414
# credentials:
415415
# accessKeyId: "you-should-set-the-access-key-id-here"
416416
# secretAccessKey: "you-should-set-the-secret-access-key-here"
417+
# serviceAccountKey: "you-should-set-the-base64-service-account-key-here"
417418
# secretName: ""
418419
# existingSecretName: ""
419420

@@ -435,6 +436,15 @@ objectStorage:
435436
# root: "mycluster"
436437
# endpoint: "oss-cn-hangzhou.aliyuncs.com"
437438

439+
# configure to use gcs storage
440+
gcs: {}
441+
# bucket: "bucket-name"
442+
# Scope: "" # example: "https://www.googleapis.com/auth/devstorage.read_write"
443+
444+
# # The data directory in gcs will be: 'gcs://<bucket>/<root>/data/...'.
445+
# root: "mycluster"
446+
# endpoint: "https://storage.googleapis.com"
447+
438448
# -- Configure to remote wal
439449
remoteWal:
440450
# -- Enable remote wal

0 commit comments

Comments
 (0)