Skip to content

Commit

Permalink
chore: delete sealed secret sample to configure credentials (#90)
Browse files Browse the repository at this point in the history
* chore: delete sealed secret sample to configure credentials

* chore: delete s3 endpoint is necessary in readme
  • Loading branch information
daviderli614 authored Dec 8, 2023
1 parent e0d7205 commit 1d18aec
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 129 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ If you want to deploy the GreptimeDB cluster, you can use the following command(
```console
helm install mycluster greptime/greptimedb-cluster -n default \
--set storage.s3.bucket=<your-bucket> \
--set storage.s3.region=<region-of-bucket> \
--set storage.s3.root=<root-directory-of-data> \
--set storage.s3.secretName=s3-credentials \
--set storage.credentials.secretName=s3-credentials \
--set storage.credentials.secretCreation.enabled=true \
--set storage.credentials.secretCreation.enableEncryption=false \
--set storage.credentials.secretCreation.data.access-key-id=<your-access-key-id> \
--set storage.credentials.secretCreation.data.secret-access-key=<your-secret-access-key>
--set storage.s3.bucket="your-bucket" \
--set storage.s3.region="region-of-bucket" \
--set storage.s3.root="root-directory-of-data" \
--set storage.credentials.secretName="s3-credentials" \
--set storage.credentials.accessKeyId="your-access-key-id" \
--set storage.credentials.secretAccessKey="your-secret-access-key"
```

4. **Use `kubectl port-forward` to access the GreptimeDB cluster**
Expand Down
2 changes: 1 addition & 1 deletion charts/greptimedb-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: greptimedb-cluster
description: A Helm chart for deploying GreptimeDB cluster in Kubernetes
type: application
version: 0.1.5
version: 0.1.6
appVersion: 0.4.4
21 changes: 9 additions & 12 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.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.4](https://img.shields.io/badge/AppVersion-0.4.4-informational?style=flat-square)
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.4](https://img.shields.io/badge/AppVersion-0.4.4-informational?style=flat-square)

## Source Code

Expand All @@ -29,7 +29,7 @@ A Helm chart for deploying GreptimeDB cluster in Kubernetes
The default installation will use the local storage:

```console
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
helm install mycluster greptime/greptimedb-cluster -n default
```

### Use AWS S3 as backend storage
Expand All @@ -38,15 +38,12 @@ Before installation, you must create the AWS S3 bucket, and the cluster will use

```console
helm install mycluster greptime/greptimedb-cluster \
--set storage.s3.bucket=<your-bucket> \
--set storage.s3.region=<region-of-bucket> \
--set storage.s3.root=<root-directory-of-data> \
--set storage.s3.secretName=s3-credentials \
--set storage.credentials.secretName=s3-credentials \
--set storage.credentials.secretCreation.enabled=true \
--set storage.credentials.secretCreation.enableEncryption=false \
--set storage.credentials.secretCreation.data.access-key-id=<your-access-key-id> \
--set storage.credentials.secretCreation.data.secret-access-key=<your-secret-access-key>
--set storage.s3.bucket="your-bucket" \
--set storage.s3.region="region-of-bucket" \
--set storage.s3.root="root-directory-of-data" \
--set storage.credentials.secretName="s3-credentials" \
--set storage.credentials.accessKeyId="your-access-key-id" \
--set storage.credentials.secretAccessKey="your-secret-access-key"
```

If you set `storage.s3.root` as `mycluser`, then the data layout will be:
Expand All @@ -60,7 +57,7 @@ If you set `storage.s3.root` as `mycluser`, then the data layout will be:
## How to uninstall

```console
helm uninstall greptimedb-cluster -n default
helm uninstall mycluster -n default
```

## Values
Expand Down
19 changes: 8 additions & 11 deletions charts/greptimedb-cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
The default installation will use the local storage:

```console
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
helm install mycluster greptime/greptimedb-cluster -n default
```

### Use AWS S3 as backend storage
Expand All @@ -38,15 +38,12 @@ Before installation, you must create the AWS S3 bucket, and the cluster will use

```console
helm install mycluster greptime/greptimedb-cluster \
--set storage.s3.bucket=<your-bucket> \
--set storage.s3.region=<region-of-bucket> \
--set storage.s3.root=<root-directory-of-data> \
--set storage.s3.secretName=s3-credentials \
--set storage.credentials.secretName=s3-credentials \
--set storage.credentials.secretCreation.enabled=true \
--set storage.credentials.secretCreation.enableEncryption=false \
--set storage.credentials.secretCreation.data.access-key-id=<your-access-key-id> \
--set storage.credentials.secretCreation.data.secret-access-key=<your-secret-access-key>
--set storage.s3.bucket="your-bucket" \
--set storage.s3.region="region-of-bucket" \
--set storage.s3.root="root-directory-of-data" \
--set storage.credentials.secretName="s3-credentials" \
--set storage.credentials.accessKeyId="your-access-key-id" \
--set storage.credentials.secretAccessKey="your-secret-access-key"
```

If you set `storage.s3.root` as `mycluser`, then the data layout will be:
Expand All @@ -60,7 +57,7 @@ If you set `storage.s3.root` as `mycluser`, then the data layout will be:
## How to uninstall

```console
helm uninstall greptimedb-cluster -n default
helm uninstall mycluster -n default
```

{{ template "chart.requirementsSection" . }}
Expand Down
6 changes: 3 additions & 3 deletions charts/greptimedb-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
{{- end }}
{{- if .Values.frontend.tls }}
tls:
secretName: {{ .Values.frontend.tls.certificates.secretName }}
secretName: {{ .Values.frontend.tls.secretName }}
{{- end }}
{{- if .Values.frontend.service }}
service: {{- toYaml .Values.frontend.service | nindent 6 }}
Expand Down Expand Up @@ -77,7 +77,7 @@ spec:
bucket: {{ .Values.storage.s3.bucket }}
region: {{ .Values.storage.s3.region }}
root: {{ .Values.storage.s3.root }}
secretName: {{ .Values.storage.s3.secretName }}
secretName: {{ .Values.storage.credentials.secretName }}
endpoint: {{ .Values.storage.s3.endpoint }}
{{- else if .Values.storage.local }}
local:
Expand All @@ -87,7 +87,7 @@ spec:
bucket: {{ .Values.storage.oss.bucket }}
region: {{ .Values.storage.oss.region }}
root: {{ .Values.storage.oss.root }}
secretName: {{ .Values.storage.oss.secretName }}
secretName: {{ .Values.storage.credentials.secretName }}
endpoint: {{ .Values.storage.oss.endpoint }}
{{- else }}
{}
Expand Down
20 changes: 0 additions & 20 deletions charts/greptimedb-cluster/templates/credentials-sealed-secret.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions charts/greptimedb-cluster/templates/credentials-secret.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.storage }}
{{- if .Values.storage.credentials }}
apiVersion: v1
metadata:
name: {{ .Values.storage.credentials.secretName }}
namespace: {{ .Release.Namespace }}
kind: Secret
type: Opaque
stringData:
access-key-id: {{ .Values.storage.credentials.accessKeyId }}
secret-access-key: {{ .Values.storage.credentials.secretAccessKey }}
{{- end }}
{{- end }}
18 changes: 0 additions & 18 deletions charts/greptimedb-cluster/templates/tls-sealed-secret.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions charts/greptimedb-cluster/templates/tls-secret.yaml

This file was deleted.

29 changes: 4 additions & 25 deletions charts/greptimedb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ frontend:

# -- Frontend tls configure
tls: {}
# certificates:
# secretName: greptimedb-frontend-tls
# secretCreation:
# enabled: true
# enableEncryption: false
# data:
# ca.crt: ""
# tls.crt: ""
# tls.key: ""
# secretName: greptimedb-frontend-tls

meta:
# -- Meta replicas
Expand Down Expand Up @@ -113,19 +105,8 @@ prometheusMonitor: {}
storage:
# credentials:
# secretName: "credentials"

# secretCreation:
# # Create the raw secret.
# enabled: true

# # Create the sealed secret.
# # If enableEncryption is true, the credentials should be encrypted.
# enableEncryption: false
#
# # If the enableEncryption is true, the data should be set as encrypted data.
# data:
# access-key-id: "you-should-set-the-access-key-id-here"
# secret-access-key: "you-should-set-the-secret-access-key-here"
# accessKeyId: "you-should-set-the-access-key-id-here"
# secretAccessKey: "you-should-set-the-secret-access-key-here"

# configure to use local storage.
local: {}
Expand All @@ -138,8 +119,7 @@ storage:

# # The data directory in S3 will be: 's3://<bucket>/<root>/data/...'.
# root: "mycluster"
# endpoint: "s3.us-west-2.amazonaws.com"
# secretName: "credentials"
# endpoint: "s3.us-west-2.amazonaws.com" # See more detail: https://docs.aws.amazon.com/general/latest/gr/s3.html

# configure to use oss storage.
oss: {}
Expand All @@ -149,4 +129,3 @@ storage:
# # The data directory in OSS will be: 'oss://<bucket>/<root>/data/...'.
# root: "mycluster"
# endpoint: "oss-cn-hangzhou.aliyuncs.com"
# secretName: "credentials"

0 comments on commit 1d18aec

Please sign in to comment.