Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Support for Using Existing Secrets in greptimedb-cluster Helm Chart for Secure Credential Management #150

Merged
merged 7 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading