aFlyBird0 commented on code in PR #16: URL: https://github.com/apache/shenyu-helm-chart/pull/16#discussion_r985088699
########## charts/shenyu/README.md: ########## @@ -6,14 +6,151 @@ Helm deployment documentation written for Apache/Shenyu. [Apache/ShenYu](https://shenyu.apache.org/docs/index/) is an asynchronous, high-performance, cross-language, responsive API gateway. -## Get Repo Info +## Add Helm repository ```shell helm repo add shenyu https://apache.github.io/shenyu-helm-chart helm repo update ``` -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ +## Install + +### Deployment prerequisites + +Before reading this document, you need to read [Deployment prerequisites](https://shenyu.apache.org/docs/deployment/deployment-before/) to complete the environment preparation before deploying ShenYu. + +### Instructions + +* **Install the application**: By default, both admin and bootstrap are installed. +* **Service Exposure**: Use NodePort to expose the service, the default port is `31095` for admin and `31195` for bootstrap. +* **Database**: Currently supports h2, MySQL, PostgreSQL as database. Default is h2. + +### h2 as database + +Running the following command will install admin and bootstrap under shenyu namespace and create namespace. + +```shell +helm install shenyu shenyu/shenyu -n=shenyu --create-namespace +``` + +### MySQL as database + +Modify and copy the following command and execute. + +```shell +helm install shenyu shenyu/shenyu -n=shenyu --create-namespace \ + --set dataSource.active=mysql \ + --set dataSource.mysql.ip=127.0.0.1 \ + --set dataSource.mysql.port=3306 \ + --set dataSource.mysql.username=root \ + --set dataSource.mysql.password=123456 +``` + +## PostgreSQL as database(Version of ShenYu > 2.5.0) + +Modify the following command and copy it to execute. + +```shell +helm install shenyu shenyu/shenyu -n=shenyu --create-namespace \ + --set dataSource.active=pg \ + --set dataSource.pg.ip=127.0.0.1 \ + --set dataSource.pg.port=5432 \ + --set dataSource.pg.username=postgres \ + --set dataSource.pg.password=123456 +``` + +## Q & A + +### 1. you need to modify a lot of configuration information, such as modify the application.yaml, how to install + +1. download the complete values.yaml +* Latest chart version: `helm show values shenyu/shenyu > values.yaml` +* Specific chart version, e.g. `0.2.0`: `helm show values shenyu/shenyu --version=0.2.0 > values.yaml` +2. modify the values.yaml file +3. Change the corresponding configuration and execute the `helm install` command with the format `-f values.yaml`. + For example: `helm install shenyu shenyu/shenyu -n=shenyu --create-namespace -f values.yaml` + +### 2. How to install only admin or bootstrap + +* Install only admin: add `-set bootstrap.enabled=false` to the end of the helm install command +* Install only bootstrap: add `--set admin.enabled=false` to the end of the helm install command + +### 3. How to install old version ShenYu + +```shell +helm search repo shenyu -l +``` + +You will get output similar to + +```shell +NAME CHART VERSION APP VERSION DESCRIPTION +shenyu/shenyu 0.2.0 2.5.0 Helm Chart for deploying Apache ShenYu in Kubernetes +... +... +``` + +where `APP_VERSION` is the version of ShenYu and `CHART_VERSION` is the version of Helm Chart. + +Select the corresponding Chart version according to the version of ShenYu you want to install, and add the `-version=CHART_VERSION` parameter at the end of the command. For example + +```shell +helm install shenyu shenyu/shenyu -n=shenyu --version=0.2.0 --create-namespace +``` + +## Values configuration instructions + +### Global Configuration +| configuration-item | type | default | description | +|--------------------|--------|-----------------------------|----------------------------------------------------------------------------------------------------| +| replicas | int | `1` | Number of replicas | +| version | string | `"2.5.0"` | shenyu version, it is not recommended to modify, please install the corresponding version directly | +| admin.enabled | bool | `true` | Whether to install shenyu-admin | +| admin.image | string | `"apache/shenyu-admin"` | shenyu-admin image | +| admin.nodePort | int | `31095` | shenyu-admin NodePort | +| bootstrap.enabled | bool | `true` | whether to install shenyu-bootstrap | +| bootstrap.image | string | `"apache/shenyu-bootstrap"` | shenyu-bootstrap image | +| bootstrap.nodePort | int | `31195` | shenyu-bootstrap NodePort | + +### Database configuration + +#### General database configuration +| configuration-item | type | default | description | +|------------------------|--------|---------|-------------------------------------------------| +| dataSource.active | string | `"h2"` | Database to use, supports `h2`, `mysql` | Review Comment: Got it -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
