diff --git a/README.md b/README.md index 538eb96..944974e 100644 --- a/README.md +++ b/README.md @@ -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= \ - --set storage.s3.region= \ - --set storage.s3.root= \ - --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= \ - --set storage.credentials.secretCreation.data.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** diff --git a/charts/greptimedb-cluster/Chart.yaml b/charts/greptimedb-cluster/Chart.yaml index 2db1c3b..ca47549 100644 --- a/charts/greptimedb-cluster/Chart.yaml +++ b/charts/greptimedb-cluster/Chart.yaml @@ -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 diff --git a/charts/greptimedb-cluster/README.md b/charts/greptimedb-cluster/README.md index fe981ec..32201f5 100644 --- a/charts/greptimedb-cluster/README.md +++ b/charts/greptimedb-cluster/README.md @@ -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 @@ -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 @@ -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= \ - --set storage.s3.region= \ - --set storage.s3.root= \ - --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= \ - --set storage.credentials.secretCreation.data.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: @@ -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 diff --git a/charts/greptimedb-cluster/README.md.gotmpl b/charts/greptimedb-cluster/README.md.gotmpl index 510811f..7ddd645 100644 --- a/charts/greptimedb-cluster/README.md.gotmpl +++ b/charts/greptimedb-cluster/README.md.gotmpl @@ -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 @@ -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= \ - --set storage.s3.region= \ - --set storage.s3.root= \ - --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= \ - --set storage.credentials.secretCreation.data.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: @@ -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" . }} diff --git a/charts/greptimedb-cluster/templates/cluster.yaml b/charts/greptimedb-cluster/templates/cluster.yaml index 6ca2dc5..f6830b9 100644 --- a/charts/greptimedb-cluster/templates/cluster.yaml +++ b/charts/greptimedb-cluster/templates/cluster.yaml @@ -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 }} @@ -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: @@ -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 }} {} diff --git a/charts/greptimedb-cluster/templates/credentials-sealed-secret.yaml b/charts/greptimedb-cluster/templates/credentials-sealed-secret.yaml deleted file mode 100644 index eb84e46..0000000 --- a/charts/greptimedb-cluster/templates/credentials-sealed-secret.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.storage.credentials }} -{{- if .Values.storage.credentials.secretCreation }} -{{- if and (eq .Values.storage.credentials.secretCreation.enabled true) (eq .Values.storage.credentials.secretCreation.enableEncryption true) }} -apiVersion: bitnami.com/v1alpha1 -kind: SealedSecret -metadata: - name: {{ .Values.storage.credentials.secretName }} - namespace: {{ .Release.Namespace }} -spec: - encryptedData: - {{- range $key, $value := .Values.storage.credentials.secretCreation.data }} - {{ $key }}: {{ $value | quote }} - {{- end }} - template: - metadata: - name: {{ .Values.storage.credentials.secretName }} - namespace: {{ .Release.Namespace }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/greptimedb-cluster/templates/credentials-secret.yaml b/charts/greptimedb-cluster/templates/credentials-secret.yaml deleted file mode 100644 index 275614d..0000000 --- a/charts/greptimedb-cluster/templates/credentials-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.storage.credentials }} -{{- if .Values.storage.credentials.secretCreation }} -{{- if and (eq .Values.storage.credentials.secretCreation.enabled true) (eq .Values.storage.credentials.secretCreation.enableEncryption false) }} -apiVersion: v1 -metadata: - name: {{ .Values.storage.credentials.secretName }} - namespace: {{ .Release.Namespace }} -kind: Secret -type: Opaque -data: - {{- range $key, $value := .Values.storage.credentials.secretCreation.data }} - {{ $key }}: {{ $value | b64enc | quote }} - {{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/greptimedb-cluster/templates/storage-credentials-secret.yaml b/charts/greptimedb-cluster/templates/storage-credentials-secret.yaml new file mode 100644 index 0000000..70744ff --- /dev/null +++ b/charts/greptimedb-cluster/templates/storage-credentials-secret.yaml @@ -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 }} diff --git a/charts/greptimedb-cluster/templates/tls-sealed-secret.yaml b/charts/greptimedb-cluster/templates/tls-sealed-secret.yaml deleted file mode 100644 index ca93abb..0000000 --- a/charts/greptimedb-cluster/templates/tls-sealed-secret.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.frontend.tls.certificates }} -{{- if .Values.frontend.tls.certificates.secretCreation }} -{{- if and (eq .Values.frontend.tls.certificates.secretCreation.enabled true) (eq .Values.frontend.tls.certificates.secretCreation.enableEncryption true) }} -apiVersion: bitnami.com/v1alpha1 -kind: SealedSecret -metadata: - name: {{ .Values.frontend.tls.certificates.secretName }} - namespace: {{ .Release.Namespace }} -spec: - encryptedData: - {{- toYaml .Values.frontend.tls.certificates.secretCreation.data | nindent 4 }} - template: - metadata: - name: {{ .Values.frontend.tls.certificates.secretName }} - namespace: {{ .Release.Namespace }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/greptimedb-cluster/templates/tls-secret.yaml b/charts/greptimedb-cluster/templates/tls-secret.yaml deleted file mode 100644 index 2d087cc..0000000 --- a/charts/greptimedb-cluster/templates/tls-secret.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.frontend.tls.certificates }} -{{- if .Values.frontend.tls.certificates.secretCreation }} -{{- if and (eq .Values.frontend.tls.certificates.secretCreation.enabled true) (eq .Values.frontend.tls.certificates.secretCreation.enableEncryption false) }} -apiVersion: v1 -metadata: - name: {{ .Values.frontend.tls.certificates.secretName }} - namespace: {{ .Release.Namespace }} -kind: Secret -type: kubernetes.io/tls -data: - {{- toYaml .Values.frontend.tls.certificates.secretCreation.data | nindent 4 }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/greptimedb-cluster/values.yaml b/charts/greptimedb-cluster/values.yaml index cb59fb8..c20976f 100644 --- a/charts/greptimedb-cluster/values.yaml +++ b/charts/greptimedb-cluster/values.yaml @@ -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 @@ -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: {} @@ -138,8 +119,7 @@ storage: # # The data directory in S3 will be: 's3:////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: {} @@ -149,4 +129,3 @@ storage: # # The data directory in OSS will be: 'oss:////data/...'. # root: "mycluster" # endpoint: "oss-cn-hangzhou.aliyuncs.com" -# secretName: "credentials"