Skip to content

Commit

Permalink
chore(greptimedb-cluster): use toYaml generate objectstorage configur…
Browse files Browse the repository at this point in the history
…ations (#114)

* chore(greptimedb-cluster): use toYaml generate objectstorage configurations

* chore: refine objectstorage secretName value

* chore: update docs

* chore: use default secretName to simple configure objectstorage credentials
  • Loading branch information
daviderli614 authored Feb 26, 2024
1 parent 0a5636f commit 102d36e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 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.17
version: 0.1.18
appVersion: 0.6.0
home: https://github.com/GreptimeTeam/greptimedb
sources:
Expand Down
2 changes: 1 addition & 1 deletion 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.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)
![Version: 0.1.18](https://img.shields.io/badge/Version-0.1.18-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
24 changes: 12 additions & 12 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,19 @@ spec:
image: '{{ .Values.initializer.registry }}/{{ .Values.initializer.repository }}:{{ .Values.initializer.tag }}'
objectStorage:
{{- if .Values.objectStorage.s3 }}
s3:
bucket: {{ .Values.objectStorage.s3.bucket }}
region: {{ .Values.objectStorage.s3.region }}
root: {{ .Values.objectStorage.s3.root }}
secretName: {{ .Release.Name }}-secret
endpoint: {{ .Values.objectStorage.s3.endpoint }}
s3: {{- toYaml .Values.objectStorage.s3 | nindent 6 }}
{{- if .Values.objectStorage }}
{{- if .Values.objectStorage.credentials }}
secretName: {{ default "storage-credentials" .Values.objectStorage.credentials.secretName }}
{{- end }}
{{- end }}
{{- else if .Values.objectStorage.oss }}
oss:
bucket: {{ .Values.objectStorage.oss.bucket }}
region: {{ .Values.objectStorage.oss.region }}
root: {{ .Values.objectStorage.oss.root }}
secretName: {{ .Release.Name }}-secret
endpoint: {{ .Values.objectStorage.oss.endpoint }}
oss: {{- toYaml .Values.objectStorage.oss | nindent 6 }}
{{- if .Values.objectStorage }}
{{- if .Values.objectStorage.credentials }}
secretName: {{ default "storage-credentials" .Values.objectStorage.credentials.secretName }}
{{- end }}
{{- end }}
{{- else }}
{}
{{- end }}
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: {{ .Release.Name }}-secret
name: {{ default "storage-credentials" .Values.objectStorage.credentials.secretName }}
namespace: {{ .Release.Namespace }}
kind: Secret
type: Opaque
Expand Down
1 change: 1 addition & 0 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ objectStorage:
# credentials:
# accessKeyId: "you-should-set-the-access-key-id-here"
# secretAccessKey: "you-should-set-the-secret-access-key-here"
# secretName: ""

# configure to use s3 storage.
s3: {}
Expand Down

0 comments on commit 102d36e

Please sign in to comment.