diff --git a/README.md b/README.md index 12a272c..a3a9ed1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is the repository that contains [Greptime](https://greptime.com/) Helm char ## Getting Started -### Add chart repository +### Add Chart Repository You can add the chart repository with the following commands: @@ -27,49 +27,66 @@ helm search repo greptime ### Install the GreptimeDB Cluster -If you want to deploy the GreptimeDB cluster, you can use the following command(use the `default` namespace): +If you want to deploy the GreptimeDB cluster, you can use the following commands: 1. **Deploy etcd cluster** We recommend using the Bitnami etcd [chart](https://github.com/bitnami/charts/blob/main/bitnami/etcd/README.md) to deploy the etcd cluster: ```console - helm upgrade --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ + helm upgrade \ + --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ --set replicaCount=3 \ --set auth.rbac.create=false \ --set auth.rbac.token.enabled=false \ - -n default + --create-namespace \ + -n etcd-cluster ``` 2. **Deploy GreptimeDB operator** + The greptimedb-operator will install in the `greptimedb-admin` namespace: + ```console - helm upgrade --install greptimedb-operator greptime/greptimedb-operator -n default + helm upgrade \ + --install \ + --create-namespace \ + greptimedb-operator greptime/greptimedb-operator \ + -n greptimedb-admin ``` 3. **Deploy GreptimeDB cluster** - - **Default Installation** + Install the GreptimeDB cluster in the `default` namespace: + + - **Default installation** + + The default installation will use the local storage: - The default installation will use the local storage: - - ```console - helm upgrade --install mycluster greptime/greptimedb-cluster -n default - ``` + ```console + helm upgrade \ + --install mycluster \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ + greptime/greptimedb-cluster \ + -n default + ``` - - **Use AWS S3 as backend storage** + - **Use AWS S3 as backend storage** - Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage: - - ```console - helm upgrade --install mycluster greptime/greptimedb-cluster \ - --set objectStorage.s3.bucket="your-bucket" \ - --set objectStorage.s3.region="region-of-bucket" \ - --set objectStorage.s3.root="root-directory-of-data" \ - --set objectStorage.credentials.accessKeyId="your-access-key-id" \ - --set objectStorage.credentials.secretAccessKey="your-secret-access-key" \ - -n default - ``` + Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage: + + ```console + helm upgrade \ + --install mycluster \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ + --set objectStorage.s3.bucket="your-bucket" \ + --set objectStorage.s3.region="region-of-bucket" \ + --set objectStorage.s3.root="root-directory-of-data" \ + --set objectStorage.credentials.accessKeyId="your-access-key-id" \ + --set objectStorage.credentials.secretAccessKey="your-secret-access-key" \ + greptime/greptimedb-cluster \ + -n default + ``` 4. **Use `kubectl port-forward` to access the GreptimeDB cluster** @@ -97,20 +114,23 @@ For example: helm upgrade --install mycluster greptime/greptimedb --values ./values.yaml ``` +To upgrade the CRDs, you can follow [the guide](charts/greptimedb-operator/README.md) of greptimedb-operator. + ### Uninstallation If you want to terminate the GreptimeDB cluster, you can use the following command: ```console helm uninstall mycluster -n default -helm uninstall etcd -n default -helm uninstall greptimedb-operator -n default +helm uninstall etcd -n etcd-cluster +helm uninstall greptimedb-operator -n greptimedb-admin ``` The CRDs of GreptimeDB are not deleted [by default](https://helm.sh/docs/topics/charts/#limitations-on-crds). You can delete them by the following command: ```console kubectl delete crds greptimedbclusters.greptime.io +kubectl delete crds greptimedbstandalones.greptime.io ``` ## List of Charts diff --git a/charts/greptimedb-cluster/Chart.yaml b/charts/greptimedb-cluster/Chart.yaml index 9e9da77..65f561d 100644 --- a/charts/greptimedb-cluster/Chart.yaml +++ b/charts/greptimedb-cluster/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: greptimedb-cluster -description: A Helm chart for deploying GreptimeDB cluster in Kubernetes +description: A Helm chart for deploying GreptimeDB cluster in Kubernetes. type: application -version: 0.1.26 +version: 0.1.27 appVersion: 0.7.2 home: https://github.com/GreptimeTeam/greptimedb sources: diff --git a/charts/greptimedb-cluster/README.md b/charts/greptimedb-cluster/README.md index 327f970..c6f2db3 100644 --- a/charts/greptimedb-cluster/README.md +++ b/charts/greptimedb-cluster/README.md @@ -1,8 +1,8 @@ # greptimedb-cluster -A Helm chart for deploying GreptimeDB cluster in Kubernetes +A Helm chart for deploying GreptimeDB cluster in Kubernetes. -![Version: 0.1.26](https://img.shields.io/badge/Version-0.1.26-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.7.2](https://img.shields.io/badge/AppVersion-0.7.2-informational?style=flat-square) +![Version: 0.1.27](https://img.shields.io/badge/Version-0.1.27-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.7.2](https://img.shields.io/badge/AppVersion-0.7.2-informational?style=flat-square) ## Source Code @@ -17,11 +17,13 @@ A Helm chart for deploying GreptimeDB cluster in Kubernetes 2. Install the etcd cluster: ```console - helm upgrade --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ - --set replicaCount=3 \ - --set auth.rbac.create=false \ - --set auth.rbac.token.enabled=false \ - -n default + helm upgrade \ + --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ + --set replicaCount=3 \ + --set auth.rbac.create=false \ + --set auth.rbac.token.enabled=false \ + --create-namespace \ + -n etcd-cluster ``` ### Default installation @@ -29,7 +31,11 @@ A Helm chart for deploying GreptimeDB cluster in Kubernetes The default installation will use the local storage: ```console -helm upgrade --install mycluster greptime/greptimedb-cluster -n default +helm upgrade \ + --install mycluster \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ + greptime/greptimedb-cluster \ + -n default ``` ### Use AWS S3 as backend storage @@ -37,12 +43,15 @@ helm upgrade --install mycluster greptime/greptimedb-cluster -n default Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage: ```console -helm upgrade --install mycluster greptime/greptimedb-cluster \ +helm upgrade \ + --install mycluster \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ --set objectStorage.s3.bucket="your-bucket" \ --set objectStorage.s3.region="region-of-bucket" \ --set objectStorage.s3.root="root-directory-of-data" \ --set objectStorage.credentials.accessKeyId="your-access-key-id" \ --set objectStorage.credentials.secretAccessKey="your-secret-access-key" \ + greptime/greptimedb-cluster \ -n default ``` diff --git a/charts/greptimedb-cluster/README.md.gotmpl b/charts/greptimedb-cluster/README.md.gotmpl index 1db8ac9..cbb9282 100644 --- a/charts/greptimedb-cluster/README.md.gotmpl +++ b/charts/greptimedb-cluster/README.md.gotmpl @@ -16,20 +16,25 @@ 2. Install the etcd cluster: ```console - helm upgrade --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ - --set replicaCount=3 \ - --set auth.rbac.create=false \ - --set auth.rbac.token.enabled=false \ - -n default + helm upgrade \ + --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ + --set replicaCount=3 \ + --set auth.rbac.create=false \ + --set auth.rbac.token.enabled=false \ + --create-namespace \ + -n etcd-cluster ``` - ### Default installation The default installation will use the local storage: ```console -helm upgrade --install mycluster greptime/greptimedb-cluster -n default +helm upgrade \ + --install mycluster \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ + greptime/greptimedb-cluster \ + -n default ``` ### Use AWS S3 as backend storage @@ -37,12 +42,15 @@ helm upgrade --install mycluster greptime/greptimedb-cluster -n default Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage: ```console -helm upgrade --install mycluster greptime/greptimedb-cluster \ +helm upgrade \ + --install mycluster \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ --set objectStorage.s3.bucket="your-bucket" \ --set objectStorage.s3.region="region-of-bucket" \ --set objectStorage.s3.root="root-directory-of-data" \ --set objectStorage.credentials.accessKeyId="your-access-key-id" \ --set objectStorage.credentials.secretAccessKey="your-secret-access-key" \ + greptime/greptimedb-cluster \ -n default ``` diff --git a/charts/greptimedb-operator/Chart.yaml b/charts/greptimedb-operator/Chart.yaml index 3db8377..7ec47d2 100644 --- a/charts/greptimedb-operator/Chart.yaml +++ b/charts/greptimedb-operator/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 kubeVersion: ">=1.18.0-0" -description: The greptimedb-operator Helm chart for Kubernetes +description: The greptimedb-operator Helm chart for Kubernetes. name: greptimedb-operator appVersion: 0.1.0-alpha.24 -version: 0.1.14 +version: 0.1.15 type: application home: https://github.com/GreptimeTeam/greptimedb-operator sources: diff --git a/charts/greptimedb-operator/README.md b/charts/greptimedb-operator/README.md index ddd24f8..79a25a5 100644 --- a/charts/greptimedb-operator/README.md +++ b/charts/greptimedb-operator/README.md @@ -1,35 +1,58 @@ # greptimedb-operator -The greptimedb-operator Helm chart for Kubernetes +The greptimedb-operator Helm chart for Kubernetes. -![Version: 0.1.14](https://img.shields.io/badge/Version-0.1.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.24](https://img.shields.io/badge/AppVersion-0.1.0--alpha.24-informational?style=flat-square) +![Version: 0.1.15](https://img.shields.io/badge/Version-0.1.15-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.24](https://img.shields.io/badge/AppVersion-0.1.0--alpha.24-informational?style=flat-square) ## Source Code + - https://github.com/GreptimeTeam/greptimedb-operator -## How to install +## How to Install + +### Add Chart Repository ```console -# Add charts repo. helm repo add greptime https://greptimeteam.github.io/helm-charts/ - -# Update charts repo. helm repo update +``` + +### Install the GreptimeDB Operator + +Install greptimedb-operator in the `greptimedb-admin` namespace: + +```console +helm upgrade \ + --install \ + --create-namespace \ + greptimedb-operator greptime/greptimedb-operator \ + -n greptimedb-admin +``` -# Search charts repo. -helm search repo greptime -l --devel +If you want to specify the chart version, you can use `--version`: -# Deploy greptimedb-operator in default namespace. -helm upgrade --install greptimedb-operator greptime/greptimedb-operator -n default +```console +helm upgrade \ + --install \ + --create-namespace \ + greptimedb-operator greptime/greptimedb-operator \ + -n greptimedb-admin \ + --version +``` -# Specifiy the chart version. -helm upgrade --install greptimedb-operator greptime/greptimedb-operator -n default --version +## Upgrade CRDs + +Helm cannot upgrade custom resource definitions in the `/crds` folder [by design](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations). When the CRDs are upgraded, you can upgrade CRDs by using `kubectl` manually: + +```console +kubectl apply -f https://github.com/GreptimeTeam/greptimedb-operator/releases/download//greptimedbclusters.yaml +kubectl apply -f https://github.com/GreptimeTeam/greptimedb-operator/releases/download//greptimedbstandalones.yaml ``` -## How to uninstall +## How to Uninstall ```console -helm uninstall greptimedb-operator -n default +helm uninstall greptimedb-operator -n greptimedb-admin ``` ## Requirements diff --git a/charts/greptimedb-operator/README.md.gotmpl b/charts/greptimedb-operator/README.md.gotmpl index 96c9e88..18a31f0 100644 --- a/charts/greptimedb-operator/README.md.gotmpl +++ b/charts/greptimedb-operator/README.md.gotmpl @@ -4,31 +4,54 @@ {{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} ## Source Code + - https://github.com/GreptimeTeam/greptimedb-operator -## How to install +## How to Install + +### Add Chart Repository ```console -# Add charts repo. helm repo add greptime https://greptimeteam.github.io/helm-charts/ - -# Update charts repo. helm repo update +``` + +### Install the GreptimeDB Operator + +Install greptimedb-operator in the `greptimedb-admin` namespace: + +```console +helm upgrade \ + --install \ + --create-namespace \ + greptimedb-operator greptime/greptimedb-operator \ + -n greptimedb-admin +``` -# Search charts repo. -helm search repo greptime -l --devel +If you want to specify the chart version, you can use `--version`: -# Deploy greptimedb-operator in default namespace. -helm upgrade --install greptimedb-operator greptime/greptimedb-operator -n default +```console +helm upgrade \ + --install \ + --create-namespace \ + greptimedb-operator greptime/greptimedb-operator \ + -n greptimedb-admin \ + --version +``` -# Specifiy the chart version. -helm upgrade --install greptimedb-operator greptime/greptimedb-operator -n default --version +## Upgrade CRDs + +Helm cannot upgrade custom resource definitions in the `/crds` folder [by design](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations). When the CRDs are upgraded, you can upgrade CRDs by using `kubectl` manually: + +```console +kubectl apply -f https://github.com/GreptimeTeam/greptimedb-operator/releases/download//greptimedbclusters.yaml +kubectl apply -f https://github.com/GreptimeTeam/greptimedb-operator/releases/download//greptimedbstandalones.yaml ``` -## How to uninstall +## How to Uninstall ```console -helm uninstall greptimedb-operator -n default +helm uninstall greptimedb-operator -n greptimedb-admin ``` {{ template "chart.requirementsSection" . }}