Skip to content

Commit

Permalink
feat: Add Support for Using Existing Secrets in greptimedb-cluster He…
Browse files Browse the repository at this point in the history
…lm Chart for Secure Credential Management (#150)
  • Loading branch information
Stephan3555 authored Aug 5, 2024
1 parent 52b6d57 commit b7574f9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 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.4
version: 0.2.5
appVersion: 0.9.1
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.2.4](https://img.shields.io/badge/Version-0.2.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.1](https://img.shields.io/badge/AppVersion-0.9.1-informational?style=flat-square)
![Version: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.1](https://img.shields.io/badge/AppVersion-0.9.1-informational?style=flat-square)

## Source Code

Expand Down
8 changes: 8 additions & 0 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,24 @@ spec:
s3: {{- toYaml .Values.objectStorage.s3 | 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 if .Values.objectStorage.oss }}
oss: {{- toYaml .Values.objectStorage.oss | 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
2 changes: 2 additions & 0 deletions charts/greptimedb-cluster/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if .Values.objectStorage }}
{{- if .Values.objectStorage.credentials }}
{{- if not .Values.objectStorage.credentials.existingSecretName }}
apiVersion: v1
metadata:
name: {{ default "storage-credentials" .Values.objectStorage.credentials.secretName }}
Expand All @@ -11,3 +12,4 @@ stringData:
secret-access-key: {{ .Values.objectStorage.credentials.secretAccessKey }}
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ objectStorage:
# accessKeyId: "you-should-set-the-access-key-id-here"
# secretAccessKey: "you-should-set-the-secret-access-key-here"
# secretName: ""
# existingSecretName: ""

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

0 comments on commit b7574f9

Please sign in to comment.