Skip to content

Commit

Permalink
feat: add gcs configuration (#162)
Browse files Browse the repository at this point in the history
* feat: add gcs configuration

* feat: add gcs configuration
  • Loading branch information
daviderli614 authored Aug 23, 2024
1 parent eb7e52f commit 3a3ae3b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 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.2.8
version: 0.2.9
appVersion: 0.9.2
home: https://github.com/GreptimeTeam/greptimedb
sources:
Expand Down
4 changes: 2 additions & 2 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.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)
![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)

## Source Code

Expand Down Expand Up @@ -201,7 +201,7 @@ helm uninstall mycluster -n default
| meta.replicas | int | `1` | Meta replicas |
| meta.storeKeyPrefix | string | `""` | Meta will store data with this key prefix |
| mysqlServicePort | int | `4002` | GreptimeDB mysql service port |
| objectStorage | object | `{"oss":{},"s3":{}}` | Configure to object storage |
| objectStorage | object | `{"gcs":{},"oss":{},"s3":{}}` | Configure to object storage |
| postgresServicePort | int | `4003` | GreptimeDB postgres service port |
| prometheusMonitor | object | `{"enabled":false,"interval":"30s","labels":{"release":"prometheus"}}` | Configure to prometheus PodMonitor |
| prometheusMonitor.enabled | bool | `false` | Create PodMonitor resource for scraping metrics using PrometheusOperator |
Expand Down
11 changes: 11 additions & 0 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,17 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- else if .Values.objectStorage.gcs }}
gcs: {{- toYaml .Values.objectStorage.gcs | nindent 6 }}
{{- if .Values.objectStorage }}
{{- if .Values.objectStorage.credentials }}
{{- if .Values.objectStorage.credentials.existingSecretName }}
secretName: {{ .Values.objectStorage.credentials.existingSecretName }}
{{- else }}
secretName: {{ default "storage-credentials" .Values.objectStorage.credentials.secretName }}
{{- end }}
{{- end }}
{{- end }}
{{- else }}
{}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/greptimedb-cluster/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ metadata:
namespace: {{ .Release.Namespace }}
kind: Secret
type: Opaque
{{- if .Values.objectStorage.credentials.serviceAccountKey }}
data:
service-account-key: {{ .Values.objectStorage.credentials.serviceAccountKey }}
{{- else }}
stringData:
access-key-id: {{ .Values.objectStorage.credentials.accessKeyId }}
secret-access-key: {{ .Values.objectStorage.credentials.secretAccessKey }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ objectStorage:
# credentials:
# accessKeyId: "you-should-set-the-access-key-id-here"
# secretAccessKey: "you-should-set-the-secret-access-key-here"
# serviceAccountKey: "you-should-set-the-base64-service-account-key-here"
# secretName: ""
# existingSecretName: ""

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

# configure to use gcs storage
gcs: {}
# bucket: "bucket-name"
# Scope: "" # example: "https://www.googleapis.com/auth/devstorage.read_write"

# # The data directory in gcs will be: 'gcs://<bucket>/<root>/data/...'.
# root: "mycluster"
# endpoint: "https://storage.googleapis.com"

# -- Configure to remote wal
remoteWal:
# -- Enable remote wal
Expand Down

0 comments on commit 3a3ae3b

Please sign in to comment.