├── .asf.yaml ├── .github └── workflows │ ├── ci.yaml │ └── release.yml ├── .gitignore ├── .gitmodules ├── DISCLAIMER ├── LICENSE ├── NOTICE ├── README.md ├── charts └── shenyu │ ├── Chart.yaml │ ├── README.md │ ├── templates │ ├── ConfigMap.yaml │ ├── _helpers.tpl │ ├── shenyu-admin-deployment.yaml │ ├── shenyu-admin-hpa.yaml │ ├── shenyu-admin-ingress.yaml │ ├── shenyu-admin-svc.yaml │ ├── shenyu-bootstrap-deployment.yaml │ ├── shenyu-bootstrap-hpa.yaml │ ├── shenyu-bootstrap-ingress.yaml │ ├── shenyu-bootstrap-svc.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── ct.yaml └── test └── kind.yaml /.asf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | github: 19 | description: Helm Chart for deploying Apache ShenYu in Kubernetes 20 | homepage: https://shenyu.apache.org/ 21 | labels: 22 | - shenyu 23 | - helm-chart 24 | - helm 25 | - kubernetes 26 | - k8s 27 | features: 28 | wiki: true 29 | issues: true 30 | projects: true 31 | ghp_branch: gh-pages 32 | ghp_path: 33 | enabled_merge_buttons: 34 | squash: true 35 | merge: false 36 | rebase: false 37 | protected_branches: 38 | main: 39 | required_status_checks: 40 | strict: true 41 | required_pull_request_reviews: 42 | dismiss_stale_reviews: true 43 | required_approving_review_count: 1 44 | notifications: 45 | commits: notifications@shenyu.apache.org 46 | issues: notifications@shenyu.apache.org 47 | pullrequests: notifications@shenyu.apache.org 48 | -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: Lint and Test Charts 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | lint-test: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v2 11 | with: 12 | submodules: recursive 13 | # ct needs history to compare 14 | fetch-depth: 0 15 | 16 | - name: Set up Helm 17 | uses: azure/setup-helm@v3.0 18 | with: 19 | version: v3.8.2 20 | 21 | - name: Update Helm Dependency 22 | run: | 23 | helm repo add bitnami https://charts.bitnami.com/bitnami 24 | cd charts/shenyu 25 | helm dependency update 26 | cd ../.. 27 | 28 | - name: Set up chart-testing 29 | uses: ./.github/actions/chart-testing-action 30 | 31 | - name: Run chart-testing (lint) 32 | run: ct lint --config ct.yaml 33 | 34 | - name: Run chart-testing (list-changed) 35 | id: list-changed 36 | run: | 37 | changed=$(ct list-changed --config ct.yaml) 38 | if [[ -n "$changed" ]]; then 39 | echo "::set-output name=changed::true" 40 | fi 41 | 42 | - name: Create kind cluster 43 | uses: ./.github/actions/kind-action 44 | if: steps.list-changed.outputs.changed == 'true' 45 | 46 | - name: Run chart-testing (install) 47 | run: ct install --config ct.yaml 48 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | with: 15 | submodules: recursive 16 | # ct needs history to compare 17 | fetch-depth: 0 18 | 19 | - name: Configure Git 20 | run: | 21 | git config user.name "$GITHUB_ACTOR" 22 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 23 | 24 | - name: Install Helm 25 | uses: azure/setup-helm@v1 26 | with: 27 | version: v3.8.1 28 | 29 | - name: Update Helm Dependency 30 | run: | 31 | helm repo add bitnami https://charts.bitnami.com/bitnami 32 | cd charts/shenyu 33 | helm dependency update 34 | cd ../.. 35 | 36 | - name: Run chart-releaser 37 | uses: ./.github/actions/chart-releaser-action 38 | env: 39 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 40 | CR_SKIP_EXISTING: true 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # helm pkg 2 | *.tgz 3 | 4 | # maven ignore 5 | target/ 6 | *.class 7 | *.jar 8 | *.war 9 | *.zip 10 | *.tar 11 | *.tar.gz 12 | dependency-reduced-pom.xml 13 | 14 | # maven plugin ignore 15 | release.properties 16 | cobertura.ser 17 | *.gpg 18 | 19 | # eclipse ignore 20 | .settings/ 21 | .project 22 | .classpath 23 | 24 | # idea ignore 25 | .idea/ 26 | *.ipr 27 | *.iml 28 | *.iws 29 | 30 | # temp ignore 31 | logs/ 32 | *.log 33 | *.doc 34 | *.cache 35 | *.diff 36 | *.patch 37 | *.tmp 38 | 39 | # system ignore 40 | .DS_Store 41 | Thumbs.db 42 | 43 | # agent build ignore 44 | /agent/ 45 | 46 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule ".github/actions/chart-testing-action"] 2 | path = .github/actions/chart-testing-action 3 | url = https://github.com/helm/chart-testing-action.git 4 | [submodule ".github/actions/kind-action"] 5 | path = .github/actions/kind-action 6 | url = https://github.com/helm/kind-action.git 7 | [submodule ".github/actions/chart-releaser-action"] 8 | path = .github/actions/chart-releaser-action 9 | url = https://github.com/helm/chart-releaser-action.git 10 | -------------------------------------------------------------------------------- /DISCLAIMER: -------------------------------------------------------------------------------- 1 | Apache ShenYu (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC. 2 | Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, 3 | communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. 4 | While incubation status is not necessarily a reflection of the completeness or stability of the code, 5 | it does indicate that the project has yet to be fully endorsed by the ASF. 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache ShenYu (incubating) 2 | Copyright 2021-2022 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # shenyu-helm-chart 2 | 3 | [English] | [中文](#简体中文) 4 | 5 | ## English 6 | 7 | ## User Guide 8 | 9 | [Apache/ShenYu](https://shenyu.apache.org/docs/index/) is an asynchronous, high-performance, cross-language, responsive API gateway. 10 | 11 | Helm installation documentation is available on the official website [Helm Deployment](https://shenyu.apache.org/helm/index/). 12 | 13 | ### Contributing Guide 14 | 15 | Thank you very much for your contribution and look forward to building ShenYu with you! 16 | 17 | Please read the [Contributor Guide](https://shenyu.apache.org/community/contributor-guide/) first to understand the basic process of contributing. 18 | 19 | #### Environment preparation 20 | 21 | * [Kubernetes](https://kubernetes.io/docs/home/) 22 | * [Helm](https://helm.sh/zh/docs/) 23 | * Optional: If you are using the JetBrain family of IDEs, it is recommended to install the [Kubernetes plugin](https://plugins.jetbrains.com/plugin/10485-kubernetes), which supports automatic rendering of values variables, template jumping and other functions. 24 | 25 | #### Initialize 26 | 27 | ```shell 28 | git clone git@github.com:apache/shenyu-helm-chart.git 29 | cd shenyu-helm-chart 30 | helm repo add bitnami https://charts.bitnami.com/bitnami 31 | cd charts/shenyu 32 | helm dependency update 33 | cd - 34 | ```` 35 | 36 | #### Development 37 | 38 | See the [Helm documentation](https://helm.sh/docs/). 39 | 40 | #### Test 41 | 42 | You can use `--dry-run --debug` to simply test the rendering of the template locally without actually installing it into the Kubernetes cluster, for example: 43 | 44 | ```shell 45 | helm install shenyu-test ./charts/shenyu -n=shenyu --create-namespace --dry-run --debug 46 | ```` 47 | #### Version 48 | 49 | The version number is divided into two, one is the version number of Chart, and the other is the version number of ShenYu. 50 | 51 | * Chart version number: defined in the `version` field in `Chart.yaml`. 52 | * ShenYu version number: defined in the `appVersion` field in `Chart.yaml`. This field only serves as an indicator, the real ShenYu version number is defined in the `image.tag` field in `values.yaml`. 53 | 54 | The version numbers mentioned below refer to the Chart version numbers. 55 | 56 | Version numbers follow **[Semantic Versioning](https://semver.org/)**. 57 | 58 | **You must bump version number in each Pull Request** 59 | 60 | * If the changes are minor, please update the patch version number, eg: `0.1.0` -> `0.1.1`. 61 | * If the change is relatively large (such as adding a new feature), but it is backward compatible, you can update the minor version number, for example: `0.1.0` -> `0.2.0`. 62 | * If the changes are not backward compatible, you can update the major version number, for example: `0.1.0` -> `1.0.0`. 63 | 64 | #### Release 65 | 66 | 1. Update the `version` field in `charts/shenyu/Chart.yaml`. 67 | 2. After the Pull Request is merged, GitHub Actions will be triggered, and the version will be automatically released. 68 | 69 | ## 简体中文 70 | 71 | [English](#English) | [中文] 72 | 73 | ### 用户指南 74 | 75 | [Apache/ShenYu](https://shenyu.apache.org/zh/docs/index) 是一个异步的,高性能的,跨语言的,响应式的 API 网关。 76 | 77 | Helm 安装文档详见官网 [Helm 部署](https://shenyu.apache.org/zh/helm/index)。 78 | 79 | ### 贡献指南 80 | 81 | 非常感谢你的贡献,期待与你一起共建 ShenYu! 82 | 83 | 请先阅读 [贡献者指南](https://shenyu.apache.org/zh/community/contributor-guide/) 以了解参与贡献的基本流程。 84 | 85 | #### 环境准备 86 | 87 | * [Kubernetes](https://kubernetes.io/zh-cn/docs/home/) 88 | * [Helm](https://helm.sh/zh/docs/) 89 | * 可选:如果你使用的是 JetBrain 家族的 IDE,推荐安装 [Kubernetes 插件](https://plugins.jetbrains.com/plugin/10485-kubernetes),支持 values 变量自动渲染、模板跳转等功能。 90 | 91 | #### 初始化 92 | 93 | ```shell 94 | git clone git@github.com:apache/shenyu-helm-chart.git 95 | cd shenyu-helm-chart 96 | helm repo add bitnami https://charts.bitnami.com/bitnami 97 | cd charts/shenyu 98 | helm dependency update 99 | cd - 100 | ``` 101 | 102 | #### 开发 103 | 104 | 请参阅 [Helm 文档](https://helm.sh/zh/docs/)。 105 | 106 | (注意, Helm 的搜索只支持英文) 107 | 108 | #### 测试 109 | 110 | 可使用 `--dry-run --debug` 在本地单纯测试模板渲染结果,而不真正安装到 Kubernetes 集群中,例如: 111 | ```shell 112 | helm install shenyu-test ./charts/shenyu -n=shenyu --create-namespace --dry-run --debug 113 | ``` 114 | 115 | #### 版本 116 | 117 | 版本号分为两个,一个是 Chart 版本号,一个是 ShenYu 版本号。 118 | 119 | * Chart 版本号:在 `Chart.yaml` 中的 `version` 字段中定义。 120 | * ShenYu 版本号:在 `Chart.yaml` 中的 `appVersion` 字段中定义。此字段只起到一个标示作用,真正的 ShenYu 版本号在 `values.yaml` 中的 `image.tag` 字段中定义。 121 | 122 | 下文提到的版本号均指 Chart 版本号。 123 | 124 | 版本号遵循 **[语义化版本](https://semver.org/lang/zh-CN/)**。 125 | 126 | **每次提交都必须更新版本号** 127 | 128 | * 如果改动很小,请更新补丁版本号,例如:`0.1.0` -> `0.1.1`。 129 | * 如果改动比较大(如新增了 feature),但是向下兼容,可以更新次版本号,例如:`0.1.0` -> `0.2.0`。 130 | * 如果改动不向下兼容,可以更新主版本号,例如:`0.1.0` -> `1.0.0`。 131 | 132 | #### 发版 133 | 134 | 1. 更新 `charts/shenyu/Chart.yaml` 中的 `version` 字段。 135 | 2. Pull Request 合并后,会触发 GitHub Actions,自动发版。 136 | -------------------------------------------------------------------------------- /charts/shenyu/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: shenyu 3 | description: Helm Chart for deploying Apache ShenYu in Kubernetes 4 | type: application 5 | version: 0.6.3 6 | appVersion: "2.5.1" 7 | icon: https://shenyu.apache.org/img/logo.png 8 | maintainers: 9 | - name: erdengk 10 | email: wannengdek@gmail.com 11 | - name: aFlyBird0 12 | email: aflybird0@gmail.com 13 | # dependencies: 14 | # - name: common 15 | # version: 1.x.x 16 | # repository: https://charts.bitnami.com/bitnami 17 | -------------------------------------------------------------------------------- /charts/shenyu/README.md: -------------------------------------------------------------------------------- 1 | # shenyu-helm-chart 2 | 3 | ## English 4 | 5 | [Apache/ShenYu](https://shenyu.apache.org/docs/index/) is an asynchronous, high-performance, cross-language, responsive API gateway. 6 | 7 | Helm installation documentation is available on the official website [Helm Deployment](https://shenyu.apache.org/helm/index/). 8 | 9 | ## 简体中文 10 | 11 | [Apache/ShenYu](https://shenyu.apache.org/zh/docs/index) 是一个异步的,高性能的,跨语言的,响应式的 API 网关。 12 | 13 | Helm 安装文档详见官网 [Helm 部署](https://shenyu.apache.org/zh/helm/index)。 14 | -------------------------------------------------------------------------------- /charts/shenyu/templates/ConfigMap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | namespace: {{.Release.Namespace}} 5 | name: {{ template "common.names.fullname" . }}-configmap 6 | labels: 7 | {{- include "common.labels.standard" . | nindent 4 }} 8 | data: 9 | application-bootstrap.yml: |- 10 | {{- /* Put the whole application-bootstrap.yml here*/}} 11 | {{- /* "common.tplvalues.render" is used to render vars in values.yaml, especially the area of "sync.websocket" */}} 12 | {{- include "common.tplvalues.render" (dict "value" .Values.applicationConfig.bootstrap "context" $) | nindent 4 }} 13 | application-admin.yml: |- 14 | {{- /* similiar to application-bootstrap.yml*/}} 15 | {{- include "common.tplvalues.render" (dict "value" .Values.applicationConfig.admin "context" $) | nindent 4 }} 16 | {{- if eq .Values.dataSource.active "h2" }} 17 | application-h2.yml: |- 18 | shenyu: 19 | database: 20 | dialect: h2 21 | init_script: "sql-script/h2/schema.sql" 22 | init_enable: {{ .Values.dataSource.initEnabled }} 23 | spring: 24 | datasource: 25 | url: {{ template "shenyu.h2.url" . }} 26 | username: {{ required ".dataSource.h2.username is required" .Values.dataSource.h2.username }} 27 | password: {{ required ".dataSource.h2.password is required" .Values.dataSource.h2.password }} 28 | driver-class-name: org.h2.Driver 29 | {{- end }} 30 | {{- if eq .Values.dataSource.active "mysql" }} 31 | application-mysql.yml: |- 32 | shenyu: 33 | database: 34 | dialect: mysql 35 | init_enable: {{ .Values.dataSource.initEnabled }} 36 | spring: 37 | datasource: 38 | url: {{ template "shenyu.mysql.url" . }} 39 | username: {{ required ".dataSource.mysql.username is required" .Values.dataSource.mysql.username }} 40 | password: {{ required "`dataSource.mysql.password` is required" .Values.dataSource.mysql.password }} 41 | driver-class-name: {{ .Values.dataSource.mysql.driverClass }} 42 | {{- end }} 43 | {{- if eq .Values.dataSource.active "pg" }} 44 | application-pg.yml: |- 45 | shenyu: 46 | database: 47 | dialect: postgresql 48 | init_enable: {{ .Values.dataSource.initEnabled }} 49 | 50 | spring: 51 | datasource: 52 | url: {{ template "shenyu.pg.url" . }} 53 | username: {{ required ".dataSource.pg.username is required" .Values.dataSource.pg.username }} 54 | password: {{ required "`dataSource.pg.password` is required" .Values.dataSource.pg.password }} 55 | driver-class-name: {{ .Values.dataSource.pg.driverClass }} 56 | 57 | mybatis: 58 | type-handlers-package: org.apache.shenyu.admin.mybatis.pg.handler 59 | {{- end }} 60 | {{- if eq .Values.dataSource.active "oracle" }} 61 | application-oracle.yml: |- 62 | shenyu: 63 | database: 64 | dialect: oracle 65 | init_enable: {{ .Values.dataSource.initEnabled }} 66 | 67 | spring: 68 | datasource: 69 | url: {{ template "shenyu.oracle.url" . }} 70 | username: {{ required ".dataSource.oracle.username is required" .Values.dataSource.oracle.username }} 71 | password: {{ required "`dataSource.oracle.password` is required" .Values.dataSource.oracle.password }} 72 | driver-class-name: oracle.jdbc.OracleDriver 73 | {{- end}} 74 | -------------------------------------------------------------------------------- /charts/shenyu/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- define "shenyu.h2.url" }} 2 | {{- .Values.dataSource.h2.url | default "jdbc:h2:mem:~/shenyu;DB_CLOSE_DELAY=-1;MODE=MySQL;" }} 3 | {{- end -}} 4 | 5 | {{- define "shenyu.mysql.url" -}} 6 | {{- with .Values.dataSource.mysql -}} 7 | {{- if .urlOverride -}} 8 | {{- .urlOverride | quote -}} 9 | {{- else -}} 10 | jdbc:mysql://{{ required ".dataSource.mysql.ip is required" .ip }}:{{ .port }}/{{ required "" .database | default "shenyu" }}?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull 11 | {{- end }} 12 | {{- end }} 13 | {{- end -}} 14 | 15 | {{- define "shenyu.pg.url" -}} 16 | {{- with .Values.dataSource.pg -}} 17 | {{- if .urlOverride -}} 18 | {{- .urlOverride -}} 19 | {{- else -}} 20 | jdbc:postgresql://{{ .ip }}:{{ .port }}/{{ .database | default "shenyu" }} 21 | {{- end }} 22 | {{- end }} 23 | {{- end -}} 24 | 25 | {{- define "shenyu.oracle.url" -}} 26 | {{- with .Values.dataSource.oracle -}} 27 | {{- if .urlOverride -}} 28 | {{- .urlOverride -}} 29 | {{- else -}} 30 | jdbc:oracle:thin:@{{ .ip }}:{{ .port }}/{{ .serviceName | default "shenyu" }} 31 | {{- end }} 32 | {{- end }} 33 | {{- end -}} 34 | 35 | 36 | {{- define "shenyu.admin.labels" -}} 37 | {{ include "common.labels.standard" . }} 38 | app.kubernetes.io/component: shenyu-admin 39 | {{- end -}} 40 | 41 | {{- define "shenyu.admin.selectorLabels" -}} 42 | {{ include "common.labels.matchLabels" . }} 43 | app.kubernetes.io/component: shenyu-admin 44 | {{- end -}} 45 | 46 | {{- define "shenyu.bootstrap.labels" -}} 47 | {{ include "common.labels.standard" . }} 48 | app.kubernetes.io/component: shenyu-bootstrap 49 | {{- end -}} 50 | 51 | {{- define "shenyu.bootstrap.selectorLabels" -}} 52 | {{ include "common.labels.matchLabels" . }} 53 | app.kubernetes.io/component: shenyu-bootstrap 54 | {{- end -}} 55 | 56 | {{/* 57 | Create a default fully qualified app name. 58 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 59 | If release name contains chart name it will be used as a full name. 60 | */}} 61 | {{- define "common.names.fullname" -}} 62 | {{- if .Values.fullnameOverride -}} 63 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 64 | {{- else -}} 65 | {{- $name := default .Chart.Name .Values.nameOverride -}} 66 | {{- if contains $name .Release.Name -}} 67 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 68 | {{- else -}} 69 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 70 | {{- end -}} 71 | {{- end -}} 72 | {{- end -}} 73 | 74 | {{/* vim: set filetype=mustache: */}} 75 | {{/* 76 | Renders a value that contains template perhaps with scope if the scope is present. 77 | Usage: 78 | {{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} 79 | {{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} 80 | */}} 81 | {{- define "common.tplvalues.render" -}} 82 | {{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} 83 | {{- if contains "{{" (toJson .value) }} 84 | {{- if .scope }} 85 | {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }} 86 | {{- else }} 87 | {{- tpl $value .context }} 88 | {{- end }} 89 | {{- else }} 90 | {{- $value }} 91 | {{- end }} 92 | {{- end -}} 93 | 94 | 95 | {{/* 96 | Kubernetes standard labels 97 | {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} 98 | */}} 99 | {{- define "common.labels.standard" -}} 100 | {{- if and (hasKey . "customLabels") (hasKey . "context") -}} 101 | {{- $default := dict "app.kubernetes.io/name" (include "common.names.name" .context) "helm.sh/chart" (include "common.names.chart" .context) "app.kubernetes.io/instance" .context.Release.Name "app.kubernetes.io/managed-by" .context.Release.Service -}} 102 | {{- with .context.Chart.AppVersion -}} 103 | {{- $_ := set $default "app.kubernetes.io/version" . -}} 104 | {{- end -}} 105 | {{ template "common.tplvalues.merge" (dict "values" (list .customLabels $default) "context" .context) }} 106 | {{- else -}} 107 | app.kubernetes.io/name: {{ include "common.names.name" . }} 108 | helm.sh/chart: {{ include "common.names.chart" . }} 109 | app.kubernetes.io/instance: {{ .Release.Name }} 110 | app.kubernetes.io/managed-by: {{ .Release.Service }} 111 | {{- with .Chart.AppVersion }} 112 | app.kubernetes.io/version: {{ . | quote }} 113 | {{- end -}} 114 | {{- end -}} 115 | {{- end -}} 116 | 117 | {{/* vim: set filetype=mustache: */}} 118 | {{/* 119 | Expand the name of the chart. 120 | */}} 121 | {{- define "common.names.name" -}} 122 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 123 | {{- end -}} 124 | 125 | {{/* 126 | Create chart name and version as used by the chart label. 127 | */}} 128 | {{- define "common.names.chart" -}} 129 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 130 | {{- end -}} 131 | 132 | {{/* 133 | Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector 134 | {{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} 135 | 136 | We don't want to loop over custom labels appending them to the selector 137 | since it's very likely that it will break deployments, services, etc. 138 | However, it's important to overwrite the standard labels if the user 139 | overwrote them on metadata.labels fields. 140 | */}} 141 | {{- define "common.labels.matchLabels" -}} 142 | {{- if and (hasKey . "customLabels") (hasKey . "context") -}} 143 | {{ merge (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") (dict "app.kubernetes.io/name" (include "common.names.name" .context) "app.kubernetes.io/instance" .context.Release.Name ) | toYaml }} 144 | {{- else -}} 145 | app.kubernetes.io/name: {{ include "common.names.name" . }} 146 | app.kubernetes.io/instance: {{ .Release.Name }} 147 | {{- end -}} 148 | {{- end -}} -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-admin-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.admin.enabled -}} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | namespace: {{ .Release.Namespace }} 6 | name: {{ template "common.names.fullname" . }}-admin 7 | labels: 8 | {{- include "shenyu.admin.labels" . | nindent 4 }} 9 | spec: 10 | selector: 11 | matchLabels: 12 | {{- include "shenyu.admin.selectorLabels" . | nindent 6 }} 13 | replicas: {{ .Values.admin.replicas }} 14 | template: 15 | metadata: 16 | labels: 17 | {{- include "shenyu.admin.labels" . | nindent 8 }} 18 | spec: 19 | {{/* check if database type is valid */}} 20 | {{- $dataSourceTypeValid := has .Values.dataSource.active (list "h2" "mysql" "pg" "oracle") -}} 21 | {{- if not $dataSourceTypeValid -}}{{- required "Invalid `.dataSource.active`. Must be one of 'h2', 'mysql', 'pg', 'oracle'" -}}{{- end}} 22 | {{- if eq .Values.dataSource.active "mysql"}} 23 | {{- $mysqlConnectorVersion := (required "once `dataSource.active` is set to 'mysql', `dataSource.mysql.connectorVersion` should not be empty" .Values.dataSource.mysql.connectorVersion)}} 24 | {{- $mysqlJarName := (print "mysql-connector-java-" $mysqlConnectorVersion ".jar") -}} 25 | initContainers: 26 | - name: download-mysql-jar 27 | image: busybox:1.35.0 28 | command: 29 | - "sh" 30 | - "-c" 31 | - "wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/{{$mysqlConnectorVersion}}/{{$mysqlJarName}}; 32 | wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/{{$mysqlConnectorVersion}}/{{$mysqlJarName}}.md5; 33 | if [ $(md5sum {{$mysqlJarName}} | cut -d ' ' -f1) = $(cat {{$mysqlJarName}}.md5) ]; 34 | then echo success; 35 | else echo failed;exit 1;fi;mv /{{$mysqlJarName}} /opt/shenyu-admin/ext-lib/mysql-connector.jar" 36 | volumeMounts: 37 | - name: mysql-connector-volume 38 | mountPath: /opt/shenyu-admin/ext-lib 39 | {{- end }} 40 | {{- if eq .Values.dataSource.active "pg"}} 41 | {{- $pgConnectorVersion := (required "once `dataSource.active` is set to 'pg', `dataSource.pg.connectorVersion` should not be empty" .Values.dataSource.pg.connectorVersion)}} 42 | {{- $pgJarName := (print "postgresql-" $pgConnectorVersion ".jar") -}} 43 | initContainers: 44 | - name: download-pg-jar 45 | image: busybox:1.35.0 46 | command: 47 | - "sh" 48 | - "-c" 49 | - "wget https://repo1.maven.org/maven2/org/postgresql/postgresql/{{$pgConnectorVersion}}/{{$pgJarName}}; 50 | wget https://repo1.maven.org/maven2/org/postgresql/postgresql/{{$pgConnectorVersion}}/{{$pgJarName}}.md5; 51 | if [ $(md5sum {{$pgJarName}} | cut -d ' ' -f1) = $(cat {{$pgJarName}}.md5) ]; 52 | then echo success; 53 | else echo failed;exit 1;fi;mv /{{$pgJarName}} /opt/shenyu-admin/ext-lib/postgresql-connector.jar" 54 | volumeMounts: 55 | - name: pg-connector-volume 56 | mountPath: /opt/shenyu-admin/ext-lib 57 | {{- end }} 58 | {{- if eq .Values.dataSource.active "oracle"}} 59 | {{- $oracleConnectorVersion := (required "once `dataSource.active` is set to 'oracle', `dataSource.oracle.connectorVersion` should not be empty" .Values.dataSource.oracle.connectorVersion)}} 60 | {{- $oracleJarName := (print "ojdbc8-" $oracleConnectorVersion ".jar") -}} 61 | initContainers: 62 | - name: download-oracle-jar 63 | image: busybox:1.35.0 64 | command: 65 | - "sh" 66 | - "-c" 67 | - "wget https://repo1.maven.org/maven2/com/oracle/ojdbc/ojdbc8/{{$oracleConnectorVersion}}/{{$oracleJarName}}; 68 | wget https://repo1.maven.org/maven2/com/oracle/ojdbc/ojdbc8/{{$oracleConnectorVersion}}/{{$oracleJarName}}.md5; 69 | if [ $(md5sum {{$oracleJarName}} | cut -d ' ' -f1) = $(cat {{$oracleJarName}}.md5) ]; 70 | then echo success; 71 | else echo failed;exit 1;fi;mv /{{$oracleJarName}} /opt/shenyu-admin/ext-lib/oracle-connector.jar" 72 | volumeMounts: 73 | - name: oracle-connector-volume 74 | mountPath: /opt/shenyu-admin/ext-lib 75 | {{- end }} 76 | containers: 77 | - name: shenyu-admin 78 | image: {{ .Values.admin.image }}:{{ required "A valid .Values.version entry required!" .Values.version }} 79 | imagePullPolicy: Always 80 | ports: 81 | - containerPort: 9095 82 | env: 83 | - name: 'TZ' 84 | value: 'Asia/Beijing' 85 | - name: ADMIN_JVM 86 | value: {{ .Values.admin.javaOpts | quote }} 87 | resources: 88 | {{- toYaml .Values.admin.resources | nindent 12 }} 89 | readinessProbe: 90 | httpGet: 91 | # todo change it to /actuator/health/readiness when shenyu-admin support it 92 | path: /actuator/health 93 | port: 9095 94 | periodSeconds: 5 95 | failureThreshold: 12 96 | livenessProbe: 97 | httpGet: 98 | # todo change it to /actuator/health/liveness when shenyu-admin support it 99 | path: /actuator/health 100 | port: 9095 101 | periodSeconds: 5 102 | failureThreshold: 12 103 | volumeMounts: 104 | - name: shenyu-admin-config 105 | mountPath: /opt/shenyu-admin/conf/application.yml 106 | subPath: application.yml 107 | {{- if eq .Values.dataSource.active "mysql" }} 108 | - name: mysql-connector-volume 109 | mountPath: /opt/shenyu-admin/ext-lib 110 | - name: shenyu-admin-config 111 | mountPath: /opt/shenyu-admin/conf/application-mysql.yml 112 | subPath: application-mysql.yml 113 | {{- end}} 114 | {{- if eq .Values.dataSource.active "pg" }} 115 | - name: pg-connector-volume 116 | mountPath: /opt/shenyu-admin/ext-lib 117 | - name: shenyu-admin-config 118 | mountPath: /opt/shenyu-admin/conf/application-pg.yml 119 | subPath: application-pg.yml 120 | {{- end}} 121 | {{- if eq .Values.dataSource.active "oracle" }} 122 | - name: oracle-connector-volume 123 | mountPath: /opt/shenyu-admin/ext-lib 124 | - name: shenyu-admin-config 125 | mountPath: /opt/shenyu-admin/conf/application-oracle.yml 126 | subPath: application-oracle.yml 127 | {{- end}} 128 | volumes: 129 | {{- if eq .Values.dataSource.active "mysql" }} 130 | - name: mysql-connector-volume 131 | emptyDir: { } 132 | {{- end }} 133 | {{- if eq .Values.dataSource.active "pg" }} 134 | - name: pg-connector-volume 135 | emptyDir: { } 136 | {{- end }} 137 | {{- if eq .Values.dataSource.active "oracle" }} 138 | - name: oracle-connector-volume 139 | emptyDir: { } 140 | {{- end }} 141 | - name: shenyu-admin-config 142 | configMap: 143 | name: {{ template "common.names.fullname" . }}-configmap 144 | items: 145 | - key: application-admin.yml 146 | path: application.yml 147 | {{- if eq .Values.dataSource.active "h2" }} 148 | - key: application-h2.yml 149 | path: application-h2.yml 150 | {{- end }} 151 | {{- if eq .Values.dataSource.active "mysql" }} 152 | - key: application-mysql.yml 153 | path: application-mysql.yml 154 | {{- end }} 155 | {{- if eq .Values.dataSource.active "pg" }} 156 | - key: application-pg.yml 157 | path: application-pg.yml 158 | {{- end }} 159 | {{- if eq .Values.dataSource.active "oracle" }} 160 | - key: application-oracle.yml 161 | path: application-oracle.yml 162 | {{- end }} 163 | {{- end -}} 164 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-admin-hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.admin.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | namespace: {{ .Release.Namespace }} 6 | name: {{ template "common.names.fullname" . }}-admin 7 | labels: 8 | {{- include "shenyu.admin.labels" . | nindent 4 }} 9 | spec: 10 | scaleTargetRef: 11 | apiVersion: apps/v1 12 | kind: Deployment 13 | name: {{ template "common.names.fullname" . }}-admin 14 | minReplicas: {{ .Values.admin.autoscaling.minReplicas }} 15 | maxReplicas: {{ .Values.admin.autoscaling.maxReplicas }} 16 | metrics: 17 | {{- if .Values.admin.autoscaling.targetCPUUtilizationPercentage }} 18 | - type: Resource 19 | resource: 20 | name: cpu 21 | targetAverageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage }} 22 | {{- end }} 23 | {{- if .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} 24 | - type: Resource 25 | resource: 26 | name: memory 27 | targetAverageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} 28 | {{- end }} 29 | {{- end }} 30 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-admin-ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.admin.ingress.enabled -}} 2 | {{- $fullName := include "common.names.fullname" . -}} 3 | {{- $svcPort := .Values.admin.service.port -}} 4 | {{- if and .Values.admin.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} 5 | {{- if not (hasKey .Values.admin.ingress.annotations "kubernetes.io/ingress.class") }} 6 | {{- $_ := set .Values.admin.ingress.annotations "kubernetes.io/ingress.class" .Values.admin.ingress.className}} 7 | {{- end }} 8 | {{- end }} 9 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} 10 | apiVersion: networking.k8s.io/v1 11 | {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 12 | apiVersion: networking.k8s.io/v1beta1 13 | {{- else -}} 14 | apiVersion: extensions/v1beta1 15 | {{- end }} 16 | kind: Ingress 17 | metadata: 18 | name: {{ $fullName }}-admin 19 | labels: 20 | {{- include "shenyu.admin.labels" . | nindent 4 }} 21 | {{- with .Values.admin.ingress.annotations }} 22 | annotations: 23 | {{- toYaml . | nindent 4 }} 24 | {{- end }} 25 | spec: 26 | {{- if and .Values.admin.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} 27 | ingressClassName: {{ .Values.admin.ingress.className }} 28 | {{- end }} 29 | {{- if .Values.admin.ingress.tls }} 30 | tls: 31 | {{- range .Values.admin.ingress.tls }} 32 | - hosts: 33 | {{- range .hosts }} 34 | - {{ . | quote }} 35 | {{- end }} 36 | secretName: {{ .secretName }} 37 | {{- end }} 38 | {{- end }} 39 | rules: 40 | {{- range .Values.admin.ingress.hosts }} 41 | - host: {{ .host | quote }} 42 | http: 43 | paths: 44 | {{- range .paths }} 45 | - path: {{ .path }} 46 | {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} 47 | pathType: {{ .pathType }} 48 | {{- end }} 49 | backend: 50 | {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 51 | service: 52 | name: {{ $fullName }}-admin 53 | port: 54 | number: {{ $svcPort }} 55 | {{- else }} 56 | serviceName: {{ $fullName }}-admin 57 | servicePort: {{ $svcPort }} 58 | {{- end }} 59 | {{- end }} 60 | {{- end }} 61 | {{- end }} 62 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-admin-svc.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.admin.enabled -}} 2 | # Now we only support NodePort mode 3 | apiVersion: v1 4 | kind: Service 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ template "common.names.fullname" . }}-admin 8 | labels: 9 | {{- include "shenyu.admin.labels" . | nindent 4 }} 10 | spec: 11 | selector: 12 | {{- include "shenyu.admin.selectorLabels" . | nindent 4 }} 13 | type: NodePort 14 | ports: 15 | - protocol: TCP 16 | port: {{ .Values.admin.service.port }} 17 | targetPort: {{ .Values.admin.service.targetPod }} 18 | nodePort: {{ .Values.admin.service.nodePort }} 19 | {{- end -}} 20 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-bootstrap-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.bootstrap.enabled -}} 2 | # shenyu-bootstrap 3 | apiVersion: apps/v1 4 | kind: Deployment 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ template "common.names.fullname" . }}-bootstrap 8 | labels: 9 | {{- include "shenyu.bootstrap.labels" . | nindent 4 }} 10 | spec: 11 | selector: 12 | matchLabels: 13 | {{- include "shenyu.bootstrap.selectorLabels" . | nindent 6 }} 14 | replicas: {{ .Values.bootstrap.replicas }} 15 | template: 16 | metadata: 17 | labels: 18 | {{- include "shenyu.bootstrap.labels" . | nindent 8 }} 19 | spec: 20 | volumes: 21 | - name: shenyu-bootstrap-config 22 | configMap: 23 | name: {{ template "common.names.fullname" . }}-configmap 24 | items: 25 | - key: application-bootstrap.yml 26 | path: application.yml 27 | containers: 28 | - name: shenyu-bootstrap 29 | image: {{ .Values.bootstrap.image }}:{{ required "A valid .Values.version entry required!" .Values.version }} 30 | ports: 31 | - containerPort: 9195 32 | env: 33 | - name: TZ 34 | value: Asia/Beijing 35 | - name: BOOT_JVM 36 | value: {{ .Values.bootstrap.javaOpts | quote }} 37 | resources: 38 | {{- toYaml .Values.bootstrap.resources | nindent 12 }} 39 | readinessProbe: 40 | httpGet: 41 | path: /actuator/health/readiness 42 | port: 9195 43 | periodSeconds: 5 44 | failureThreshold: 12 45 | livenessProbe: 46 | httpGet: 47 | path: /actuator/health/liveness 48 | port: 9195 49 | periodSeconds: 5 50 | failureThreshold: 12 51 | volumeMounts: 52 | - name: shenyu-bootstrap-config 53 | mountPath: /opt/shenyu-bootstrap/conf/application.yml 54 | subPath: application.yml 55 | {{- end -}} 56 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-bootstrap-hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.bootstrap.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | namespace: {{ .Release.Namespace }} 6 | name: {{ template "common.names.fullname" . }}-bootstrap 7 | labels: 8 | {{- include "shenyu.bootstrap.labels" . | nindent 4 }} 9 | spec: 10 | scaleTargetRef: 11 | apiVersion: apps/v1 12 | kind: Deployment 13 | name: {{ template "common.names.fullname" . }}-bootstrap 14 | minReplicas: {{ .Values.bootstrap.autoscaling.minReplicas }} 15 | maxReplicas: {{ .Values.bootstrap.autoscaling.maxReplicas }} 16 | metrics: 17 | {{- if .Values.bootstrap.autoscaling.targetCPUUtilizationPercentage }} 18 | - type: Resource 19 | resource: 20 | name: cpu 21 | targetAverageUtilization: {{ .Values.bootstrap.autoscaling.targetCPUUtilizationPercentage }} 22 | {{- end }} 23 | {{- if .Values.bootstrap.autoscaling.targetMemoryUtilizationPercentage }} 24 | - type: Resource 25 | resource: 26 | name: memory 27 | targetAverageUtilization: {{ .Values.bootstrap.autoscaling.targetMemoryUtilizationPercentage }} 28 | {{- end }} 29 | {{- end }} 30 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-bootstrap-ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.bootstrap.ingress.enabled -}} 2 | {{- $fullName := include "common.names.fullname" . -}} 3 | {{- $svcPort := .Values.bootstrap.service.port -}} 4 | {{- if and .Values.bootstrap.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} 5 | {{- if not (hasKey .Values.bootstrap.ingress.annotations "kubernetes.io/ingress.class") }} 6 | {{- $_ := set .Values.bootstrap.ingress.annotations "kubernetes.io/ingress.class" .Values.bootstrap.ingress.className}} 7 | {{- end }} 8 | {{- end }} 9 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} 10 | apiVersion: networking.k8s.io/v1 11 | {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 12 | apiVersion: networking.k8s.io/v1beta1 13 | {{- else -}} 14 | apiVersion: extensions/v1beta1 15 | {{- end }} 16 | kind: Ingress 17 | metadata: 18 | name: {{ $fullName }}-bootstrap 19 | labels: 20 | {{- include "shenyu.bootstrap.labels" . | nindent 4 }} 21 | {{- with .Values.bootstrap.ingress.annotations }} 22 | annotations: 23 | {{- toYaml . | nindent 4 }} 24 | {{- end }} 25 | spec: 26 | {{- if and .Values.bootstrap.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} 27 | ingressClassName: {{ .Values.bootstrap.ingress.className }} 28 | {{- end }} 29 | {{- if .Values.bootstrap.ingress.tls }} 30 | tls: 31 | {{- range .Values.bootstrap.ingress.tls }} 32 | - hosts: 33 | {{- range .hosts }} 34 | - {{ . | quote }} 35 | {{- end }} 36 | secretName: {{ .secretName }} 37 | {{- end }} 38 | {{- end }} 39 | rules: 40 | {{- range .Values.bootstrap.ingress.hosts }} 41 | - host: {{ .host | quote }} 42 | http: 43 | paths: 44 | {{- range .paths }} 45 | - path: {{ .path }} 46 | {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} 47 | pathType: {{ .pathType }} 48 | {{- end }} 49 | backend: 50 | {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 51 | service: 52 | name: {{ $fullName }}-bootstrap 53 | port: 54 | number: {{ $svcPort }} 55 | {{- else }} 56 | serviceName: {{ $fullName }}-bootstrap 57 | servicePort: {{ $svcPort }} 58 | {{- end }} 59 | {{- end }} 60 | {{- end }} 61 | {{- end }} 62 | -------------------------------------------------------------------------------- /charts/shenyu/templates/shenyu-bootstrap-svc.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.bootstrap.enabled -}} 2 | # Now we only support NodePort mode 3 | apiVersion: v1 4 | kind: Service 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ template "common.names.fullname" . }}-bootstrap 8 | labels: 9 | {{- include "shenyu.bootstrap.labels" . | nindent 4 }} 10 | spec: 11 | selector: 12 | {{- include "shenyu.bootstrap.selectorLabels" . | nindent 4 }} 13 | type: NodePort 14 | ports: 15 | - protocol: TCP 16 | port: {{ .Values.bootstrap.service.port }} 17 | targetPort: {{ .Values.bootstrap.service.targetPod }} 18 | nodePort: {{ .Values.bootstrap.service.nodePort }} 19 | {{- end -}} 20 | -------------------------------------------------------------------------------- /charts/shenyu/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ template "common.names.fullname" .}}-test-connection" 5 | labels: 6 | {{- include "common.labels.standard" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['sh', '-c'] 14 | args: 15 | - | 16 | wget -q -O - '{{ include "common.names.fullname" . }}-admin:{{ .Values.admin.service.port }}/actuator/health' 17 | wget -q -O - '{{ include "common.names.fullname" . }}-bootstrap:{{ .Values.bootstrap.service.port }}/actuator/health' 18 | # TODO add more tests, such as shenyu test scripts 19 | restartPolicy: Never 20 | -------------------------------------------------------------------------------- /charts/shenyu/values.yaml: -------------------------------------------------------------------------------- 1 | ################################################# 2 | # global configs # 3 | ################################################# 4 | # it's not recommended to change this version 5 | version: 2.5.1 6 | admin: 7 | enabled: true 8 | # replicas of admin, K8s will load balance the requests 9 | replicas: 1 10 | image: apache/shenyu-admin 11 | service: 12 | port: 9095 13 | targetPod: 9095 14 | # if you want to change "admin service port", please edit here 15 | nodePort: 31095 16 | # jvm options for admin 17 | javaOpts: "" 18 | # K8s resources quota for admin 19 | resources: 20 | # requests: 21 | # cpu: 100m 22 | # memory: 512Mi 23 | # limits: 24 | # cpu: 1000m 25 | # memory: 1024Mi 26 | autoscaling: 27 | enabled: false 28 | minReplicas: 1 29 | maxReplicas: 10 30 | targetCPUUtilizationPercentage: 75 31 | targetMemoryUtilizationPercentage: 75 32 | ingress: 33 | enabled: false 34 | className: "" 35 | annotations: {} 36 | # kubernetes.io/ingress.class: nginx 37 | # kubernetes.io/tls-acme: "true" 38 | hosts: 39 | - host: shenyu-admin.local 40 | paths: 41 | - path: / 42 | pathType: ImplementationSpecific 43 | tls: [] 44 | # - secretName: chart-example-tls 45 | # hosts: 46 | # - chart-example.local 47 | bootstrap: 48 | enabled: true 49 | # replicas of bootstrap, K8s will load balance the requests 50 | replicas: 2 51 | image: apache/shenyu-bootstrap 52 | service: 53 | port: 9195 54 | targetPod: 9195 55 | # if you want to change "bootstrap service port", please edit here 56 | nodePort: 31195 57 | # jvm options for bootstrap 58 | javaOpts: "" 59 | # K8s resources quota for bootstrap 60 | resources: 61 | # requests: 62 | # cpu: 100m 63 | # memory: 512Mi 64 | # limits: 65 | # cpu: 1000m 66 | # memory: 1024Mi 67 | autoscaling: 68 | enabled: false 69 | minReplicas: 1 70 | maxReplicas: 10 71 | targetCPUUtilizationPercentage: 75 72 | targetMemoryUtilizationPercentage: 75 73 | ingress: 74 | enabled: false 75 | className: "" 76 | annotations: {} 77 | # kubernetes.io/ingress.class: nginx 78 | # kubernetes.io/tls-acme: "true" 79 | hosts: 80 | - host: shenyu-bootstrap.local 81 | paths: 82 | - path: / 83 | pathType: ImplementationSpecific 84 | tls: [] 85 | # - secretName: chart-example-tls 86 | # hosts: 87 | # - chart-example.local 88 | 89 | ################################################# 90 | # datasource config of shenyu-admin # 91 | ################################################# 92 | 93 | dataSource: 94 | # options: [h2, mysql, pg, oracle] 95 | active: h2 96 | # init database and tables 97 | initEnabled: true 98 | h2: 99 | # use custom datasource url, default is jdbc:h2:mem:~/shenyu;DB_CLOSE_DELAY=-1;MODE=MySQL; 100 | url: "" 101 | username: sa 102 | password: sa 103 | mysql: 104 | # use custom datasource url and ignore other configs, the format is jdbc:mysql://xxxxxxx 105 | urlOverride: "" 106 | ip: 107 | port: 3306 108 | username: root 109 | password: 110 | database: shenyu 111 | # mysql driver class name 112 | # mysql5 : com.mysql.jdbc.Driver 113 | # mysql6-8 : com.mysql.cj.jdbc.Driver 114 | driverClass: com.mysql.cj.jdbc.Driver 115 | connectorVersion: 8.0.23 116 | pg: 117 | # use custom datasource url and ignore other configs, the format is jdbc:postgresql://xxxxxxx 118 | urlOverride: "" 119 | ip: 120 | port: 5432 121 | username: postgres 122 | password: 123 | database: shenyu 124 | # pg driver class name 125 | driverClass: org.postgresql.Driver 126 | connectorVersion: 42.5.0 127 | oracle: 128 | # use custom datasource url and ignore other configs, the format is jdbc:oracle:xxxxxx 129 | urlOverride: "" 130 | ip: 131 | port: 1521 132 | username: root 133 | password: 134 | serviceName: shenyu 135 | # oracle driver class name 136 | driverClass: oracle.jdbc.OracleDriver 137 | connectorVersion: 19.3.0.0 138 | 139 | ################################################# 140 | # application.yml of admin and bootstrap # 141 | ################################################# 142 | 143 | applicationConfig: 144 | bootstrap: 145 | server: 146 | # Do not change this port, it is used by the Kubernetes service 147 | port: 9195 148 | address: 0.0.0.0 149 | 150 | spring: 151 | main: 152 | allow-bean-definition-overriding: true 153 | application: 154 | name: shenyu-bootstrap 155 | codec: 156 | max-in-memory-size: 2MB 157 | cloud: 158 | discovery: 159 | enabled: false 160 | nacos: 161 | discovery: 162 | # Spring Cloud Alibaba Dubbo use this. 163 | server-addr: 127.0.0.1:8848 164 | enabled: false 165 | namespace: ShenyuRegisterCenter 166 | 167 | # if you want use ribbon please config every server. 168 | # springCloud-test: 169 | # ribbon: 170 | # NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList 171 | 172 | eureka: 173 | client: 174 | enabled: false 175 | serviceUrl: 176 | defaultZone: http://localhost:8761/eureka/ 177 | instance: 178 | prefer-ip-address: true 179 | 180 | # security: 181 | # oauth2: 182 | # client: 183 | # registration: 184 | # : 185 | # client-id: 186 | # client-secret: 187 | # provider: 188 | # : 189 | # authorization-uri: 190 | # token-uri: 191 | # user-info-uri: 192 | # jwk-set-uri: 193 | 194 | management: 195 | health: 196 | defaults: 197 | enabled: false 198 | 199 | shenyu: 200 | trie: 201 | childrenSize: 10000 202 | pathVariableSize: 1000 203 | pathRuleCacheSize: 1000 204 | matchMode: antPathMatch 205 | matchCache: 206 | selectorEnabled: false 207 | # 256MB 208 | maxSelectorFreeMemory: 256 209 | netty: 210 | http: 211 | # set to false, user can custom the netty tcp server config. 212 | webServerFactoryEnabled: true 213 | selectCount: 1 214 | workerCount: 4 215 | accessLog: false 216 | serverSocketChannel: 217 | soRcvBuf: 87380 218 | soBackLog: 128 219 | soReuseAddr: false 220 | connectTimeoutMillis: 10000 221 | writeBufferHighWaterMark: 65536 222 | writeBufferLowWaterMark: 32768 223 | writeSpinCount: 16 224 | autoRead: false 225 | allocType: "pooled" 226 | messageSizeEstimator: 8 227 | singleEventExecutorPerGroup: true 228 | socketChannel: 229 | soKeepAlive: false 230 | soReuseAddr: false 231 | soLinger: -1 232 | tcpNoDelay: true 233 | soRcvBuf: 87380 234 | soSndBuf: 16384 235 | ipTos: 0 236 | allowHalfClosure: false 237 | connectTimeoutMillis: 10000 238 | writeBufferHighWaterMark: 65536 239 | writeBufferLowWaterMark: 32768 240 | writeSpinCount: 16 241 | autoRead: false 242 | allocType: "pooled" 243 | messageSizeEstimator: 8 244 | singleEventExecutorPerGroup: true 245 | # httpclient: 246 | # strategy: webClient 247 | # connectTimeout: 45000 248 | # responseTimeout: 3000 249 | # readerIdleTime: 3000 250 | # writerIdleTime: 3000 251 | # allIdleTime: 3000 252 | # readTimeout: 3000 253 | # writeTimeout: 3000 254 | # wiretap: false 255 | # keepAlive: false 256 | # maxInMemorySize: 1 #1mb 257 | # pool: 258 | # type: ELASTIC 259 | # name: proxy 260 | # maxConnections: 16 261 | # acquireTimeout: 45000 262 | # maxIdleTime: 3000 263 | # proxy: 264 | # host: 265 | # port: 266 | # username: 267 | # password: 268 | # nonProxyHostsPattern: 269 | # ssl: 270 | # useInsecureTrustManager: true 271 | # keyStoreType: PKCS12 272 | # keyStorePath: classpath:keystore.p12 273 | # keyStorePassword: 123456 274 | # keyStoreProvider: 275 | # keyPassword: 123456 276 | # trustedX509Certificates: 277 | # handshakeTimeout: 278 | # closeNotifyFlushTimeout: 279 | # closeNotifyReadTimeout: 280 | # defaultConfigurationType: 281 | # threadPool: 282 | # prefix: shenyu 283 | # selectCount: 1 284 | # workerCount: 8 285 | # daemon: true 286 | register: 287 | enabled: false 288 | # zookeeper, etcd, consul 289 | registerType: zookeeper 290 | # http://localhost:2379 #localhost:8848 291 | serverLists: localhost:2181 292 | props: 293 | cross: 294 | enabled: true 295 | allowedHeaders: 296 | allowedMethods: "*" 297 | # the same of Access-Control-Allow-Origin: "*" 298 | allowedAnyOrigin: true 299 | # allowedOrigin: 300 | # format : schema://prefix spacer domain 301 | # Access-Control-Allow-Origin: "http://a.apache.org,http://b.apache.org" 302 | # spacer: "." 303 | # domain: apache.org 304 | # prefixes: 305 | # - a # a.apache.org 306 | # - b # b.apache.org 307 | # origins: 308 | # - c.apache.org 309 | # - d.apache.org 310 | # - http://e.apache.org 311 | # originRegex: ^http(|s)://(.*\.|)abc.com$ 312 | allowedExpose: "" 313 | maxAge: "18000" 314 | allowCredentials: true 315 | 316 | switchConfig: 317 | local: true 318 | file: 319 | enabled: true 320 | maxSize: 10 321 | sync: 322 | websocket: 323 | urls: ws://{{ template "common.names.fullname" . }}-admin.{{.Release.Namespace}}.svc.cluster.local:9095/websocket 324 | allowOrigin: ws://{{ template "common.names.fullname" . }}-bootstrap.{{.Release.Namespace}}.svc.cluster.local:9195 325 | # zookeeper: 326 | # url: localhost:2181 327 | # sessionTimeout: 5000 328 | # connectionTimeout: 2000 329 | # http: 330 | # url: http://{{ template "common.names.fullname" . }}-admin.{{.Release.Namespace}}.svc.cluster.local:9095 331 | # username: 332 | # password: 333 | # nacos: 334 | # url: localhost:8848 335 | # namespace: 1c10d748-af86-43b9-8265-75f487d20c6c 336 | # username: 337 | # password: 338 | # acm: 339 | # enabled: false 340 | # endpoint: acm.aliyun.com 341 | # namespace: 342 | # accessKey: 343 | # secretKey: 344 | # etcd: 345 | # url: http://localhost:2379 346 | # consul: 347 | # url: http://localhost:8500 348 | # waitTime: 1000 349 | # watchDelay: 1000 350 | exclude: 351 | enabled: false 352 | paths: 353 | - /favicon.ico 354 | fallback: 355 | enabled: false 356 | paths: 357 | - /fallback/hystrix 358 | - /fallback/resilience4j 359 | health: 360 | enabled: true 361 | paths: 362 | - /actuator/health 363 | - /actuator/health/readiness 364 | - /actuator/health/liveness 365 | - /health_check 366 | extPlugin: 367 | path: 368 | enabled: true 369 | threads: 1 370 | scheduleTime: 300 371 | scheduleDelay: 30 372 | scheduler: 373 | enabled: false 374 | type: fixed 375 | threads: 16 376 | upstreamCheck: 377 | enabled: false 378 | timeout: 3000 379 | healthyThreshold: 1 380 | unhealthyThreshold: 1 381 | interval: 5000 382 | printEnabled: true 383 | printInterval: 60000 384 | ribbon: 385 | serverListRefreshInterval: 10000 386 | metrics: 387 | enabled: false 388 | name: prometheus 389 | host: 127.0.0.1 390 | port: 8090 391 | jmxConfig: 392 | props: 393 | jvm_enabled: true 394 | # plugins: 395 | # rate-limiter.enabled: false 396 | local: 397 | enabled: false 398 | sha512Key: "BA3253876AED6BC22D4A6FF53D8406C6AD864195ED144AB5C87621B6C233B548BAEAE6956DF346EC8C17F5EA10F35EE3CBC514797ED7DDD3145464E2A0BAB413" 399 | # sharedPool: 400 | # enable: true 401 | # prefix: "shenyu-shared" 402 | # corePoolSize: 200 403 | # maximumPoolSize: 2000 404 | # keepAliveTime: 60000 405 | # # 1GB 406 | # maxWorkQueueMemory: 1073741824 407 | # # 256MB 408 | # maxFreeMemory: 268435456 409 | 410 | logging: 411 | level: 412 | root: info 413 | org.springframework.boot: info 414 | org.apache.ibatis: info 415 | org.apache.shenyu.bonuspoint: info 416 | org.apache.shenyu.lottery: info 417 | org.apache.shenyu: info 418 | admin: 419 | server: 420 | # Do not change this port, it is used by the Kubernetes service 421 | port: 9095 422 | address: 0.0.0.0 423 | 424 | spring: 425 | profiles: 426 | active: "{{ .Values.dataSource.active }}" 427 | thymeleaf: 428 | cache: true 429 | encoding: utf-8 430 | enabled: true 431 | prefix: classpath:/static/ 432 | suffix: .html 433 | mvc: 434 | pathmatch: 435 | matching-strategy: ant_path_matcher 436 | 437 | mybatis: 438 | config-location: classpath:/mybatis/mybatis-config.xml 439 | mapper-locations: classpath:/mappers/*.xml 440 | 441 | shenyu: 442 | register: 443 | # http #zookeeper #etcd #nacos #consul 444 | registerType: http 445 | # localhost:2181 #http://localhost:2379 #localhost:8848 446 | serverLists: 447 | props: 448 | sessionTimeout: 5000 449 | connectionTimeout: 2000 450 | checked: true 451 | zombieCheckTimes: 5 452 | scheduledTime: 10 453 | nacosNameSpace: ShenyuRegisterCenter 454 | sync: 455 | websocket: 456 | enabled: true 457 | messageMaxSize: 10240 458 | allowOrigins: ws://{{ template "common.names.fullname" . }}-admin.{{.Release.Namespace}}.svc.cluster.local:9095;ws://{{ template "common.names.fullname" . }}-bootstrap.{{.Release.Namespace}}.svc.cluster.local:9195; 459 | # zookeeper: 460 | # url: localhost:2181 461 | # sessionTimeout: 5000 462 | # connectionTimeout: 2000 463 | # http: 464 | # enabled: true 465 | # nacos: 466 | # url: localhost:8848 467 | # namespace: 1c10d748-af86-43b9-8265-75f487d20c6c 468 | # username: 469 | # password: 470 | # acm: 471 | # enabled: false 472 | # endpoint: acm.aliyun.com 473 | # namespace: 474 | # accessKey: 475 | # secretKey: 476 | # etcd: 477 | # url: http://localhost:2379 478 | # consul: 479 | # url: http://localhost:8500 480 | ldap: 481 | enabled: false 482 | url: ldap://xxxx:xxx 483 | bind-dn: cn=xxx,dc=xxx,dc=xxx 484 | password: xxxx 485 | base-dn: ou=xxx,dc=xxx,dc=xxx 486 | object-class: person 487 | login-field: cn 488 | jwt: 489 | expired-seconds: 86400000 490 | shiro: 491 | white-list: 492 | - / 493 | - /favicon.* 494 | - /static/** 495 | - /index** 496 | - /platform/login 497 | - /websocket 498 | - /error 499 | - /actuator/health 500 | - /swagger-ui.html 501 | - /webjars/** 502 | - /swagger-resources/** 503 | - /v2/api-docs 504 | - /csrf 505 | swagger: 506 | enable: true 507 | dashboard: 508 | core: 509 | onlySuperAdminPermission: 510 | - system:manager:add 511 | - system:manager:edit 512 | - system:manager:delete 513 | - system:role:add 514 | - system:role:edit 515 | - system:role:delete 516 | - system:resource:addButton 517 | - system:resource:addMenu 518 | - system:resource:editButton 519 | - system:resource:editMenu 520 | - system:resource:deleteButton 521 | - system:resource:deleteMenu 522 | 523 | logging: 524 | level: 525 | root: info 526 | org.springframework.boot: info 527 | org.apache.ibatis: info 528 | org.apache.shenyu.bonuspoint: info 529 | org.apache.shenyu.lottery: info 530 | org.apache.shenyu: info 531 | -------------------------------------------------------------------------------- /ct.yaml: -------------------------------------------------------------------------------- 1 | remote: origin 2 | target-branch: main 3 | chart-dirs: 4 | - charts 5 | helm-extra-args: --timeout 600s 6 | -------------------------------------------------------------------------------- /test/kind.yaml: -------------------------------------------------------------------------------- 1 | kind: Cluster 2 | apiVersion: kind.x-k8s.io/v1alpha4 3 | nodes: 4 | - role: control-plane 5 | - role: worker 6 | - role: worker 7 | kubeadmConfigPatches: 8 | - | 9 | kind: ClusterConfiguration 10 | metadata: 11 | name: config 12 | controllerManager: 13 | extraArgs: 14 | namespace-sync-period: 10s 15 | concurrent-deployment-syncs: "30" 16 | deployment-controller-sync-period: 10s 17 | --------------------------------------------------------------------------------