├── .asf.yaml ├── .github └── workflows │ ├── e2e.ci.yaml │ └── publish-helm.yaml ├── .gitignore ├── CHANGES.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── chart ├── adapter │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── apiservice.yaml │ │ ├── deployment.yaml │ │ ├── rbac.yaml │ │ └── service.yaml │ └── values.yaml ├── operator │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── cert.yaml │ │ ├── configmap.yaml │ │ ├── crds.yaml │ │ ├── deployment.yaml │ │ ├── java-agent-configmap.yaml │ │ ├── rbac.yaml │ │ ├── service.yaml │ │ └── webhook.yaml │ └── values.yaml └── skywalking │ ├── .helmignore │ ├── Chart.yaml │ ├── OWNERS │ ├── README.md │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── oap-clusterrole.yaml │ ├── oap-clusterrolebinding.yaml │ ├── oap-cm-dynamic.yaml │ ├── oap-cm-override.yaml │ ├── oap-deployment.yaml │ ├── oap-init.job.yaml │ ├── oap-role.yaml │ ├── oap-rolebinding.yaml │ ├── oap-serviceaccount.yaml │ ├── oap-svc.yaml │ ├── satellite-cm-override.yaml │ ├── satellite-deployment.yaml │ ├── satellite-role.yaml │ ├── satellite-rolebinding.yaml │ ├── satellite-serviceaccount.yaml │ ├── satellite-svc.yaml │ ├── ui-deployment.yaml │ ├── ui-ingress.yaml │ └── ui-svc.yaml │ ├── values-my-es.yaml │ └── values.yaml ├── logo ├── skywalking-logo.png ├── skywalking-logo2.png └── sw-logo-for-chart.jpg └── test └── e2e ├── e2e-banyandb-cluster.yaml ├── e2e-banyandb-standalone.yaml ├── e2e-elasticsearch.yaml ├── env ├── expected ├── dependency-services-instance-productpage.yml ├── dependency-services-productpage.yml ├── dependency-services-reviews.yml ├── endpoint.yaml ├── hpa-metrics.yaml ├── metrics-has-value.yml ├── metrics.yaml ├── replicas.yaml ├── service-apdex.yaml ├── service-endpoint-productpage.yml ├── service-endpoint-reviews.yml ├── service-instance.yml ├── service.yml └── swck-demo-service.yaml ├── kind.yaml ├── setup-e2e-shell ├── install-etcdctl.sh ├── install-helm.sh ├── install-istioctl.sh ├── install-kubectl.sh ├── install-swctl.sh ├── install-yq.sh └── install.sh ├── swck ├── oap-agent-adapter-hpa.yaml ├── oap-agent-banyandb.yaml ├── oap-ui-agent-elasticsearch.yaml ├── oap-ui-agent-oapserverconfig.yaml └── oap-ui-agent-satellite.yaml ├── traffic-gen.yaml └── values.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: Apache SkyWalking Kubernetes Deployment Helm Chart 20 | homepage: https://skywalking.apache.org/ 21 | labels: 22 | - skywalking 23 | - observability 24 | - apm 25 | - distributed-tracing 26 | - service-mesh 27 | - dapper 28 | - kubernetes 29 | - helm 30 | enabled_merge_buttons: 31 | squash: true 32 | merge: false 33 | rebase: false 34 | -------------------------------------------------------------------------------- /.github/workflows/e2e.ci.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with 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 | name: Test 18 | 19 | on: 20 | pull_request: 21 | push: 22 | paths-ignore: 23 | - '**.md' 24 | branches: 25 | - master 26 | 27 | env: 28 | SKIP_TEST: true 29 | ISTIO_VERSION: 1.7.1 30 | 31 | jobs: 32 | als: 33 | runs-on: ubuntu-latest 34 | timeout-minutes: 60 35 | strategy: 36 | matrix: 37 | test: 38 | - name: Run Skywalking E2E Test (Elasticsearch as database) 39 | config: test/e2e/e2e-elasticsearch.yaml 40 | - name: Run Skywalking E2E Test (standalone BanyanDB as database) 41 | config: test/e2e/e2e-banyandb-standalone.yaml 42 | - name: Run Skywalking E2E Test (BanyanDB cluster as database) 43 | config: test/e2e/e2e-banyandb-cluster.yaml 44 | - name: Run SWCK oap-agent-adapter-hpa Test 45 | config: test/e2e/swck/oap-agent-adapter-hpa.yaml 46 | - name: Run SWCK oap-agent-banyandb Test 47 | config: test/e2e/swck/oap-agent-banyandb.yaml 48 | - name: Run SWCK oap-ui-agent-elasticsearch Test 49 | config: test/e2e/swck/oap-ui-agent-elasticsearch.yaml 50 | - name: Run SWCK oap-ui-agent-oapserverconfig Test 51 | config: test/e2e/swck/oap-ui-agent-oapserverconfig.yaml 52 | - name: Run SWCK oap-ui-agent-satellite Test 53 | config: test/e2e/swck/oap-ui-agent-satellite.yaml 54 | name: ${{ matrix.test.name }} 55 | env: 56 | OAP_TAG: ddbed6d091c4c20dbb43294fbd03778bdbb8471a 57 | OAP_REPO: ghcr.io/apache/skywalking/oap 58 | UI_TAG: ddbed6d091c4c20dbb43294fbd03778bdbb8471a 59 | UI_REPO: ghcr.io/apache/skywalking/ui 60 | SATELLITE_TAG: v35bfaff6352b4dc351a706772796a1f79b651c14 61 | SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite 62 | BANYANDB_TAG: 0e734c462571dcf55dbb7761211c07d8b156521e 63 | BANYANDB_REPO: ghcr.io/apache/skywalking-banyandb 64 | steps: 65 | - uses: actions/checkout@v2 66 | - name: Login to ghcr 67 | uses: docker/login-action@v1 68 | with: 69 | registry: ghcr.io 70 | username: ${{ github.repository_owner }} 71 | password: ${{ secrets.GITHUB_TOKEN }} 72 | - name: Setup go 73 | uses: actions/setup-go@v4 74 | with: 75 | go-version: '1.20' 76 | - name: ${{ matrix.test.name }} 77 | uses: apache/skywalking-infra-e2e@cf589b4a0b9f8e6f436f78e9cfd94a1ee5494180 78 | with: 79 | e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }} 80 | - if: ${{ failure() }} 81 | run: | 82 | df -h 83 | du -sh . 84 | for dir in $(find . -type d -not -name '.*'); do 85 | du -sh $dir 86 | done 87 | docker images 88 | - uses: actions/upload-artifact@v4 89 | if: ${{ failure() }} 90 | name: Upload Logs 91 | with: 92 | name: logs 93 | path: "${{ env.SW_INFRA_E2E_LOG_DIR }}" 94 | 95 | 96 | build: 97 | runs-on: ubuntu-latest 98 | needs: [als] 99 | steps: 100 | - name: dummy 101 | run: echo 102 | -------------------------------------------------------------------------------- /.github/workflows/publish-helm.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with 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 | name: Publish Snapshot Helm Chart 18 | 19 | on: 20 | push: 21 | branches: 22 | - master 23 | 24 | env: 25 | HUB: ghcr.io/apache/skywalking-helm 26 | VERSION: 0.0.0-${{ github.sha }} 27 | 28 | jobs: 29 | publish: 30 | runs-on: ubuntu-latest 31 | permissions: 32 | contents: read 33 | packages: write 34 | timeout-minutes: 20 35 | name: Publish Snapshot Helm Chart 36 | strategy: 37 | matrix: 38 | chart: 39 | - path: chart/adapter 40 | name: skywalking-helm-swck-adapter 41 | - path: chart/operator 42 | name: skywalking-helm-swck-operator 43 | - path: chart/skywalking 44 | name: skywalking-helm 45 | steps: 46 | - uses: actions/checkout@v3 47 | - name: Log in to the Container registry 48 | uses: docker/login-action@v1.10.0 49 | with: 50 | registry: ${{ env.HUB }} 51 | username: ${{ github.actor }} 52 | password: ${{ secrets.GITHUB_TOKEN }} 53 | - name: Deploy SkyWalking Helm Chart 54 | run: | 55 | sed -i "s/^version: .*/version: $VERSION/" ${{ matrix.chart.path }}/Chart.yaml 56 | helm dep up ${{ matrix.chart.path }} 57 | helm package ${{ matrix.chart.path }} 58 | helm push ${{ matrix.chart.name }}-$VERSION.tgz oci://${{ env.HUB }} 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | .idea 4 | .vscode 5 | chart/skywalking/charts/ 6 | chart/skywalking/Chart.lock 7 | chart/operator/charts 8 | chart/operator/Chart.lock 9 | chart/adapter/charts 10 | chart/adapter/Chart.lock 11 | *.tgz 12 | -------------------------------------------------------------------------------- /CHANGES.md: -------------------------------------------------------------------------------- 1 | Changes by Version 2 | ================== 3 | Release Notes. 4 | 5 | 4.7.0 6 | ------------------ 7 | 8 | - Bump up Banyandb Helm version to 0.3.0. 9 | 10 | 4.6.0 11 | ------------------ 12 | 13 | - Integrate BanyanDB as storage solution. 14 | - Bump up swck to v0.9.0. 15 | - Bump up BanyanDB Helm version to 0.2.0. 16 | - Bump up OAP and UI to 10.0.0. 17 | - Make release process work with Linux. 18 | - Support setting `secretMounts` in OAP. 19 | 20 | 4.5.0 21 | ------------------ 22 | 23 | - Add helm chart for swck v0.7.0. 24 | - Add `pprof` port export in satellite. 25 | - Trunc the resource name in swck's helm chart to no more than 63 characters. 26 | - Adding the `configmap` into cluster role for oap init mode. 27 | - Add config to set Pod securityContext. 28 | - Keep the job name prefix the same as OAP Deployment name. 29 | - Use startup probe option for first initialization of application 30 | - Allow setting env for UI deployment. 31 | - Add Istio ServiceEntry permissions. 32 | 33 | 4.4.0 34 | ------------------ 35 | 36 | - [**Breaking Change**]: remove `.Values.oap.initEs`, there is no need to use this to control whether to run init job anymore, 37 | SkyWalking Helm Chart automatically delete the init job when installing/upgrading. 38 | - [**Breaking Change**]: remove `files/config.d` mechanism and use `values.yaml` files to put the configurations to override 39 | default config files in the `/skywalking/config` folder, using `files/config.d` is very limited and you have to clone the source 40 | codes if you want to use this mechanism, now you can simply use our [Docker Helm Chart](https://hub.docker.com/repository/docker/apache/skywalking-helm) to install. 41 | - Refactor oap init job, and support postgresql storage. 42 | - Upgrade ElasticSearch Helm Chart dependency version. 43 | 44 | 4.3.0 45 | ------------------ 46 | 47 | - Remove Istio adapter. 48 | - Add `.Values.oap.initEs` to work with ElasticSearch init job. 49 | - Add "pods/log" to OAP so on-demand Pod log can work. 50 | 51 | 4.2.0 52 | ------------------ 53 | 54 | - Fix Can't evaluate field Capabilities in type interface{}. 55 | - Update the document let that all docker images use the latest version. 56 | - Fix missing `nodes` resource permission when the OAP using `k8s-mesh` analyzer. 57 | - Fix bug that customized config files are not loaded into es-init job. 58 | - Add skywalking satellite support. 59 | 60 | 4.1.0 61 | ------------------ 62 | 63 | - Add missing service account to init job. 64 | - Improve notes.txt and `nodePort` configuration. 65 | - Improve ingress compatibility. 66 | - Fix bug that customized config files are not loaded into es-init job. 67 | - Add `imagePullSecrets` and node selector. 68 | - Fix istio adapter description. 69 | - Enhancement: allow mounting binary data files. 70 | 71 | 4.0.0 72 | ------------------ 73 | 74 | #### Features 75 | - Allow overriding configurations files under /skywalking/config 76 | - Unify the usages of different SkyWalking versions 77 | - Add Values for init container in case of using private regestry 78 | - Add `services`, `endpoints` resources in ClusterRole 79 | 80 | 3.1.0 81 | ------------------ 82 | 83 | #### Features 84 | - Support SkyWalking 8.1.0 85 | - Support enable oap dynamic configuration through k8s configmap 86 | 87 | #### Download 88 | - http://skywalking.apache.org/downloads/ 89 | 90 | 3.0.0 91 | ------------------ 92 | 93 | #### Features 94 | - Support SkyWalking 8.0.1 95 | 96 | ##### Note: 97 | - 8.0.0 image is not suitable as chart image, ISSUE: https://github.com/apache/skywalking/issues/4953 98 | 99 | 2.0.0 100 | ------------------ 101 | 102 | #### Features 103 | - Support SkyWalking 7.0.0 104 | - Support set ES user/password 105 | - Add CI for release 106 | 107 | 1.1.0 108 | ------------------ 109 | 110 | #### Features 111 | - Support SkyWalking 6.6.0 112 | - Support deploy Elasticsearch 7 113 | - The official helm repo was changed to the official Elasticsearch repo (https://helm.elastic.co/) 114 | 115 | 1.0.0 116 | ------------------ 117 | 118 | #### Features 119 | - Deploy SkyWalking by Chart 120 | - Elasticsearch deploy optional 121 | -------------------------------------------------------------------------------- /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 | 203 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | SHELL = /bin/bash -eo pipefail 17 | 18 | TMPDIR ?= /tmp 19 | 20 | CHART_DIR = chart/skywalking 21 | VERSION = $(shell cat ${CHART_DIR}/Chart.yaml | grep '^version: ' | awk '{print $$2}') 22 | CHART_NAME = $(shell cat ${CHART_DIR}/Chart.yaml | grep '^name: ' | awk '{print $$2}') 23 | 24 | RELEASE_SRC = ${CHART_NAME}-${VERSION}-src 25 | 26 | prepare: 27 | cp -R NOTICE ${CHART_DIR}/NOTICE 28 | cp -R LICENSE ${CHART_DIR}/LICENSE 29 | 30 | package: prepare 31 | helm dep up ${CHART_DIR} 32 | helm package ${CHART_DIR} 33 | rm -rf ${CHART_DIR}/NOTICE 34 | rm -rf ${CHART_DIR}/LICENSE 35 | 36 | clean: 37 | rm -f $(TMPDIR)/$(RELEASE_SRC).tgz \ 38 | rm -rf bin/ \ 39 | rm -rf ${CHART_DIR}/NOTICE \ 40 | rm -rf ${CHART_DIR}/LICENSE \ 41 | rm -rf ${CHART_DIR}/Chart.lock \ 42 | rm -rf ${CHART_DIR}/charts \ 43 | rm -rf ${CHART_NAME}-${VERSION}.tgz \ 44 | rm -rf ${CHART_NAME}-${VERSION}.tgz.asc \ 45 | rm -rf ${CHART_NAME}-${VERSION}.tgz.sha512 \ 46 | rm -rf ${RELEASE_SRC}.tgz \ 47 | rm -rf ${RELEASE_SRC}.tgz.asc \ 48 | rm -rf ${RELEASE_SRC}.tgz.sha512 49 | 50 | release-src: clean 51 | tar -zcvf $(TMPDIR)/$(RELEASE_SRC).tgz \ 52 | --exclude bin \ 53 | --exclude .git \ 54 | --exclude .idea \ 55 | --exclude .gitignore \ 56 | --exclude .DS_Store \ 57 | --exclude .github \ 58 | . && \ 59 | mv $(TMPDIR)/$(RELEASE_SRC).tgz . 60 | 61 | release: release-src package 62 | gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz 63 | shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512 64 | gpg --batch --yes --armor --detach-sig $(CHART_NAME)-$(VERSION).tgz 65 | shasum -a 512 $(CHART_NAME)-$(VERSION).tgz > $(CHART_NAME)-$(VERSION).tgz.sha512 66 | 67 | publish: package 68 | helm push ${CHART_NAME}-${VERSION}.tgz oci://registry-1.docker.io/apache 69 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache SkyWalking 2 | Copyright 2017-2021 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /chart/adapter/.helmignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Patterns to ignore when building packages. 17 | # This supports shell glob matching, relative path matching, and 18 | # negation (prefixed with !). Only one pattern per line. 19 | .DS_Store 20 | # Common VCS dirs 21 | .git/ 22 | .gitignore 23 | .bzr/ 24 | .bzrignore 25 | .hg/ 26 | .hgignore 27 | .svn/ 28 | # Common backup files 29 | *.swp 30 | *.bak 31 | *.tmp 32 | *~ 33 | # Various IDEs 34 | .project 35 | .idea/ 36 | *.tmproj 37 | OWNERS 38 | -------------------------------------------------------------------------------- /chart/adapter/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v2 17 | name: skywalking-helm-swck-adapter 18 | home: https://github.com/apache/skywalking-swck/tree/master/adapter 19 | version: 0.9.0 20 | description: Provide custom metrics coming from SkyWalking OAP cluster for autoscaling by Kubernetes HPA 21 | icon: https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg 22 | sources: 23 | - https://github.com/apache/skywalking-helm 24 | maintainers: 25 | - name: hanahmily 26 | email: hanahmily@gmail.com 27 | - name: dashanji 28 | email: dashanjic@gmail.com 29 | -------------------------------------------------------------------------------- /chart/adapter/README.md: -------------------------------------------------------------------------------- 1 | Apache SWCK Adapter Helm Chart 2 | 3 | [Apache SWCK Adapter](https://github.com/apache/skywalking-swck/tree/master/adapter) is a component that provides custom metrics coming from SkyWalking OAP cluster for autoscaling by [Kubernetes HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/). 4 | 5 | ## Introduction 6 | 7 | This chart bootstraps a [SWCK Adapter](https://github.com/apache/skywalking-swck/blob/master/docs/custom-metrics-adapter.md) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. 8 | 9 | ## Prerequisites 10 | 11 | - Kubernetes 1.24.0+ 12 | - Helm 3 13 | 14 | ## Installing the Chart 15 | 16 | To install the chart with the release name `my-release`: 17 | 18 | ```shell 19 | $ helm install my-release adapter -n 20 | ``` 21 | 22 | The command deploys the adapter on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 23 | 24 | > **Tip**: List all releases using `helm list` 25 | 26 | ## Uninstalling the Chart 27 | 28 | To uninstall/delete the `my-release` deployment: 29 | 30 | ```shell 31 | $ helm uninstall my-release -n 32 | ``` 33 | 34 | The command removes all the adapter components associated with the chart and deletes the release. 35 | 36 | ## Configuration 37 | 38 | The following table lists the configurable parameters of the adapter chart and their default values. 39 | 40 | | Parameter | Description | Default | 41 | |--------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------| 42 | | `fullnameOverride` | Override fullname | `nil` | 43 | | `.namespace` | Namespace of adapter deployment | `skywalking-custom-metrics-system` | 44 | | `.replicas` | The replicas of adapter | `1` | 45 | | `.serviceAccountName` | The service account name of adapter | `skywalking-custom-metrics-apiserver` | 46 | | `.image.repository` | Adapter container image name | `docker.io/apache/skywalking-swck` | 47 | | `.image.pullPolicy` | Adapter container image pull policy | `IfNotPresent` | 48 | | `.image.tag` | Adapter container image tag | `v0.9.0` | 49 | | `.service.port` | The port for the adapter service | `6.1.0` | 50 | | `.oap.service.name` | The service name of OAP | `skywalking-system-oap` | 51 | | `.oap.service.namespace` | The service namespace of OAP | `skywalking-system` | 52 | | `.oap.service.port` | The service port of OAP | `12800` | 53 | | `.resources.limits.cpu` | The limits of cpu in the adapter | `100m` | 54 | | `.resources.limits.memory` | The limits of memory in the adapter | `200Mi` | 55 | | `.resources.requests.cpu` | The requests of cpu in the adapter | `100m` | 56 | | `.resources.requests.memory` | The requests of memory in the adapter | `200Mi` | 57 | | `.affinity` | The affinity policy of adapter | `{}` | 58 | 59 | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, 60 | 61 | **Note** You could refer to the [helm install](https://helm.sh/docs/helm/helm_install/) for more command information. 62 | 63 | ```console 64 | $ helm install myrelease adapter --set fullnameOverride=newadapter 65 | ``` 66 | 67 | Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, 68 | 69 | ```console 70 | $ helm install my-release adapter -f values.yaml 71 | ``` 72 | 73 | > **Tip**: You can use the default [values.yaml](values.yaml) 74 | -------------------------------------------------------------------------------- /chart/adapter/templates/NOTES.txt: -------------------------------------------------------------------------------- 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 | ************************************************************************ 19 | * * 20 | * Skywalking Adapter Helm Chart by SkyWalking Team * 21 | * * 22 | ************************************************************************ 23 | 24 | Thank you for installing {{ .Chart.Name }}. 25 | 26 | Your release is named {{ .Release.Name }} in the namespace {{ .Release.Namespace }}. 27 | 28 | To get all info about the release, try: 29 | 30 | $ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }} # get all deployment yaml files 31 | 32 | Learn more details, please visit https://github.com/apache/skywalking-swck/tree/master/adapter -------------------------------------------------------------------------------- /chart/adapter/templates/_helpers.tpl: -------------------------------------------------------------------------------- 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 | {{/* 19 | Expand the name of the chart. 20 | */}} 21 | {{- define "adapter.name" -}} 22 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | 25 | {{/* 26 | Create a default fully qualified app name. 27 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 28 | If release name contains chart name it will be used as a full name. 29 | */}} 30 | {{- define "adapter.fullname" -}} 31 | {{- if .Values.fullnameOverride }} 32 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 33 | {{- else }} 34 | {{- $name := default .Chart.Name .Values.nameOverride }} 35 | {{- if contains $name .Release.Name }} 36 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 37 | {{- else }} 38 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 39 | {{- end }} 40 | {{- end }} 41 | {{- end }} 42 | 43 | {{/* 44 | Create chart name and version as used by the chart label. 45 | */}} 46 | {{- define "adapter.chart" -}} 47 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 48 | {{- end }} 49 | 50 | {{/* 51 | Common labels 52 | */}} 53 | {{- define "adapter.labels" -}} 54 | helm.sh/chart: {{ include "adapter.chart" . }} 55 | {{ include "adapter.selectorLabels" . }} 56 | {{- if .Chart.AppVersion }} 57 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 58 | {{- end }} 59 | app.kubernetes.io/managed-by: {{ .Release.Service }} 60 | {{- end }} 61 | 62 | {{/* 63 | Selector labels 64 | */}} 65 | {{- define "adapter.selectorLabels" -}} 66 | app.kubernetes.io/name: {{ include "adapter.name" . }} 67 | app.kubernetes.io/instance: {{ .Release.Name }} 68 | {{- end }} 69 | 70 | -------------------------------------------------------------------------------- /chart/adapter/templates/apiservice.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: apiregistration.k8s.io/v1 17 | kind: APIService 18 | metadata: 19 | name: v1beta1.external.metrics.k8s.io 20 | spec: 21 | group: external.metrics.k8s.io 22 | groupPriorityMinimum: 100 23 | insecureSkipTLSVerify: true 24 | service: 25 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-apiserver"))) | printf "%s-custom-metrics-apiserver" }} 26 | namespace: {{ .Release.Namespace }} 27 | version: v1beta1 28 | versionPriority: 100 29 | -------------------------------------------------------------------------------- /chart/adapter/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | labels: 20 | app: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-apiserver"))) | printf "%s-custom-metrics-apiserver" }} 21 | {{- include "adapter.labels" . | nindent 4 }} 22 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-adapter"))) | printf "%s-adapter" }} 23 | namespace: {{ .Release.Namespace }} 24 | spec: 25 | replicas: {{ .Values.replicas }} 26 | selector: 27 | matchLabels: 28 | app: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-apiserver"))) | printf "%s-custom-metrics-apiserver" }} 29 | {{- include "adapter.selectorLabels" . | nindent 6 }} 30 | template: 31 | metadata: 32 | labels: 33 | app: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-apiserver"))) | printf "%s-custom-metrics-apiserver" }} 34 | {{- include "adapter.selectorLabels" . | nindent 8 }} 35 | name: custom-metrics-apiserver 36 | spec: 37 | containers: 38 | - args: 39 | - --secure-port={{ .Values.service.port }} 40 | - --v=10 41 | - --oap-addr=http://{{ .Values.oap.service.name }}.{{ .Values.oap.service.namespace }}:{{ .Values.oap.service.port }}/graphql 42 | - --cert-dir=/tmp 43 | command: 44 | - /adapter 45 | image: {{ .Values.image.repository }}:{{ required ".adapter.image.tag is required" .Values.image.tag }} 46 | imagePullPolicy: {{ .Values.image.pullPolicy }} 47 | name: adapter 48 | resources: 49 | {{- toYaml .Values.resources | nindent 12 }} 50 | ports: 51 | - containerPort: {{ .Values.service.port }} 52 | name: https 53 | volumeMounts: 54 | - mountPath: /tmp 55 | name: temp-vol 56 | serviceAccountName: {{ .Values.serviceAccountName }} 57 | volumes: 58 | - emptyDir: {} 59 | name: temp-vol 60 | {{- with .Values.affinity }} 61 | affinity: 62 | {{- toYaml . | nindent 8 }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /chart/adapter/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v1 17 | kind: ServiceAccount 18 | metadata: 19 | name: {{ .Values.serviceAccountName }} 20 | namespace: {{ .Release.Namespace }} 21 | --- 22 | apiVersion: rbac.authorization.k8s.io/v1 23 | kind: ClusterRole 24 | metadata: 25 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-resource-reader"))) | printf "%s-custom-metrics-resource-reader" }} 26 | rules: 27 | - apiGroups: 28 | - "" 29 | resources: 30 | - pods 31 | - nodes 32 | - nodes/stats 33 | verbs: 34 | - get 35 | - list 36 | - watch 37 | --- 38 | apiVersion: rbac.authorization.k8s.io/v1 39 | kind: ClusterRole 40 | metadata: 41 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-server-resources"))) | printf "%s-custom-metrics-server-resources" }} 42 | rules: 43 | - apiGroups: 44 | - custom.metrics.k8s.io 45 | - external.metrics.k8s.io 46 | resources: 47 | - '*' 48 | verbs: 49 | - '*' 50 | --- 51 | apiVersion: rbac.authorization.k8s.io/v1 52 | kind: RoleBinding 53 | metadata: 54 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-auth-reader"))) | printf "%s-custom-metrics-auth-reader" }} 55 | namespace: kube-system 56 | roleRef: 57 | apiGroup: rbac.authorization.k8s.io 58 | kind: Role 59 | name: extension-apiserver-authentication-reader 60 | subjects: 61 | - kind: ServiceAccount 62 | name: {{ .Values.serviceAccountName }} 63 | namespace: {{ .Release.Namespace }} 64 | --- 65 | apiVersion: rbac.authorization.k8s.io/v1 66 | kind: ClusterRoleBinding 67 | metadata: 68 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-hpa-controller"))) | printf "%s-custom-metrics-hpa-controller" }} 69 | roleRef: 70 | apiGroup: rbac.authorization.k8s.io 71 | kind: ClusterRole 72 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-server-resources"))) | printf "%s-custom-metrics-server-resources" }} 73 | subjects: 74 | - kind: ServiceAccount 75 | name: horizontal-pod-autoscaler 76 | namespace: kube-system 77 | --- 78 | apiVersion: rbac.authorization.k8s.io/v1 79 | kind: ClusterRoleBinding 80 | metadata: 81 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-resource-reader"))) | printf "%s-custom-metrics-resource-reader" }} 82 | roleRef: 83 | apiGroup: rbac.authorization.k8s.io 84 | kind: ClusterRole 85 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-resource-reader"))) | printf "%s-custom-metrics-resource-reader" }} 86 | subjects: 87 | - kind: ServiceAccount 88 | name: {{ .Values.serviceAccountName }} 89 | namespace: {{ .Release.Namespace }} 90 | --- 91 | apiVersion: rbac.authorization.k8s.io/v1 92 | kind: ClusterRoleBinding 93 | metadata: 94 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-system:auth-delegator"))) | printf "%s-custom-metrics-system:auth-delegator" }} 95 | roleRef: 96 | apiGroup: rbac.authorization.k8s.io 97 | kind: ClusterRole 98 | name: system:auth-delegator 99 | subjects: 100 | - kind: ServiceAccount 101 | name: {{ .Values.serviceAccountName }} 102 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /chart/adapter/templates/service.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v1 17 | kind: Service 18 | metadata: 19 | name: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-apiserver"))) | printf "%s-custom-metrics-apiserver" }} 20 | namespace: {{ .Release.Namespace }} 21 | spec: 22 | ports: 23 | - name: https 24 | port: 443 25 | targetPort: {{ .Values.service.port }} 26 | selector: 27 | app: {{ include "adapter.fullname" . | trunc (int (sub 63 (len "-custom-metrics-apiserver"))) | printf "%s-custom-metrics-apiserver" }} -------------------------------------------------------------------------------- /chart/adapter/values.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Default values for skywalking-swck. 17 | # This is a YAML-formatted file. 18 | # Declare variables to be passed into your templates. 19 | 20 | replicas: 1 21 | 22 | serviceAccountName: skywalking-custom-metrics-apiserver 23 | image: 24 | repository: docker.io/apache/skywalking-swck 25 | pullPolicy: IfNotPresent 26 | tag: "v0.9.0" 27 | service: 28 | port: 6443 29 | oap: 30 | service: 31 | name: skywalking-system-oap 32 | namespace: skywalking-system 33 | port: 12800 34 | resources: 35 | # We usually recommend not to specify default resources and to leave this as a conscious 36 | # choice for the user. This also increases chances charts run on environments with little 37 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 38 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 39 | limits: 40 | cpu: 100m 41 | memory: 200Mi 42 | requests: 43 | cpu: 100m 44 | memory: 200Mi 45 | affinity: {} 46 | -------------------------------------------------------------------------------- /chart/operator/.helmignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Patterns to ignore when building packages. 17 | # This supports shell glob matching, relative path matching, and 18 | # negation (prefixed with !). Only one pattern per line. 19 | .DS_Store 20 | # Common VCS dirs 21 | .git/ 22 | .gitignore 23 | .bzr/ 24 | .bzrignore 25 | .hg/ 26 | .hgignore 27 | .svn/ 28 | # Common backup files 29 | *.swp 30 | *.bak 31 | *.tmp 32 | *~ 33 | # Various IDEs 34 | .project 35 | .idea/ 36 | *.tmproj 37 | OWNERS 38 | -------------------------------------------------------------------------------- /chart/operator/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v2 17 | name: skywalking-helm-swck-operator 18 | home: https://github.com/apache/skywalking-swck/tree/master/operator 19 | version: 0.9.0 20 | description: Provision and maintain SkyWalking backend components 21 | icon: https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg 22 | sources: 23 | - https://github.com/apache/skywalking-helm 24 | maintainers: 25 | - name: hanahmily 26 | email: hanahmily@gmail.com 27 | - name: dashanji 28 | email: dashanjic@gmail.com 29 | dependencies: 30 | - name: cert-manager 31 | version: 1.9.1 32 | repository: https://charts.jetstack.io 33 | condition: cert-manager.enabled 34 | -------------------------------------------------------------------------------- /chart/operator/README.md: -------------------------------------------------------------------------------- 1 | Apache SWCK Operator Helm Chart 2 | 3 | [Apache SWCK Operator](https://github.com/apache/skywalking-swck/tree/master/operator) is a platform for the SkyWalking user that provisions, upgrades, maintains SkyWalking relevant components, and makes them work natively on Kubernetes. 4 | 5 | ## Introduction 6 | 7 | This chart bootstraps a [SWCK Operator](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. 8 | 9 | ## Prerequisites 10 | 11 | - Kubernetes 1.24.0+ 12 | - Helm 3 13 | 14 | ## Installing the Chart 15 | 16 | To install the chart with the release name `my-release`: 17 | 18 | ```shell 19 | $ helm install my-release operator -n 20 | ``` 21 | 22 | The command deploys the operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 23 | 24 | > **Tip**: List all releases using `helm list` 25 | 26 | ## Uninstalling the Chart 27 | 28 | To uninstall/delete the `my-release` deployment: 29 | 30 | ```shell 31 | $ helm uninstall my-release -n 32 | ``` 33 | 34 | The command removes all the operator components associated with the chart and deletes the release. 35 | 36 | ## Configuration 37 | 38 | The following table lists the configurable parameters of the operator chart and their default values. 39 | 40 | | Parameter | Description | Default | 41 | |------------------------------|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------| 42 | | `fullnameOverride` | Override fullname | `nil` | 43 | | `.replicaCount` | The replicas of operator | `1` | 44 | | `.serviceAccountName` | The service account name of operator | `skywalking-swck-controller-manager` | 45 | | `.image.repository` | Operator container image name | `docker.io/apache/skywalking-swck` | 46 | | `.image.pullPolicy` | Operator container image pull policy | `IfNotPresent` | 47 | | `.image.tag` | Operator container image tag | `v0.9.0` | 48 | | `.metrics.service.port` | The port for the operator metrics service | `8443` | 49 | | `.webhook.service.port` | The port for the operator web hook service | `9443` | 50 | | `.resources.limits.cpu` | The limits of cpu in the operator | `200m` | 51 | | `.resources.limits.memory` | The limits of memory in the operator | `300Mi` | 52 | | `.resources.requests.cpu` | The requests of cpu in the operator | `200m` | 53 | | `.resources.requests.memory` | The requests of memory in the operator | `300Mi` | 54 | | `.affinity` | The affinity policy of operator | `{}` | 55 | | `cert-manager.enabled` | Whether to install demo cert-manager. DO NOT use this in production, this is for quick start. | `false` | 56 | 57 | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, 58 | 59 | **Note** You could refer to the [helm install](https://helm.sh/docs/helm/helm_install/) for more command information. 60 | 61 | ```console 62 | $ helm install myrelease operator --set fullnameOverride=newoperator 63 | ``` 64 | 65 | Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, 66 | 67 | ```console 68 | $ helm install my-release operator -f values.yaml 69 | ``` 70 | 71 | > **Tip**: You can use the default [values.yaml](values.yaml) 72 | -------------------------------------------------------------------------------- /chart/operator/templates/NOTES.txt: -------------------------------------------------------------------------------- 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 | ************************************************************************ 19 | * * 20 | * Skywalking Operator Helm Chart by SkyWalking Team * 21 | * * 22 | ************************************************************************ 23 | 24 | Thank you for installing {{ .Chart.Name }}. 25 | 26 | Your release is named {{ .Release.Name }} in the namespace {{ .Release.Namespace }}. 27 | 28 | To get all info about the release, try: 29 | 30 | $ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }} # get all deployment yaml files 31 | 32 | Learn more, please visit https://github.com/apache/skywalking-swck/tree/master/operator -------------------------------------------------------------------------------- /chart/operator/templates/_helpers.tpl: -------------------------------------------------------------------------------- 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 | {{/* 19 | Create a default fully qualified app name. 20 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 21 | If release name contains chart name it will be used as a full name. 22 | */}} 23 | {{- define "operator.fullname" -}} 24 | {{- if .Values.fullnameOverride }} 25 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 26 | {{- else }} 27 | {{- $name := default .Chart.Name .Values.nameOverride }} 28 | {{- if contains $name .Release.Name }} 29 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 30 | {{- else }} 31 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | {{- end }} 34 | {{- end }} 35 | 36 | {{/* 37 | Create chart name and version as used by the chart label. 38 | */}} 39 | {{- define "operator.chart" -}} 40 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 41 | {{- end }} 42 | 43 | {{/* 44 | Common labels 45 | */}} 46 | {{- define "operator.labels" -}} 47 | helm.sh/chart: {{ include "operator.chart" . }} 48 | {{ include "operator.selectorLabels" . }} 49 | {{- if .Chart.AppVersion }} 50 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 51 | {{- end }} 52 | app.kubernetes.io/managed-by: {{ .Release.Service }} 53 | {{- end }} 54 | 55 | {{/* 56 | Selector labels 57 | */}} 58 | {{- define "operator.selectorLabels" -}} 59 | app.kubernetes.io/name: {{ include "operator.fullname" . }} 60 | app.kubernetes.io/instance: {{ .Release.Name }} 61 | {{- end }} 62 | 63 | -------------------------------------------------------------------------------- /chart/operator/templates/cert.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.webhook.enabled }} 17 | apiVersion: cert-manager.io/v1 18 | kind: Certificate 19 | metadata: 20 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf "%s-serving-cert" }} 21 | namespace: {{ .Release.Namespace }} 22 | annotations: 23 | "helm.sh/hook": post-install,post-upgrade 24 | "helm.sh/hook-weight": "2" 25 | spec: 26 | dnsNames: 27 | - {{ include "operator.fullname" . | trunc (int (sub 63 (len "-webhook-service"))) | printf "%s-webhook-service" }}.{{ .Release.Namespace }}.svc 28 | - {{ include "operator.fullname" . | trunc (int (sub 63 (len "-webhook-service"))) | printf "%s-webhook-service" }}.{{ .Release.Namespace }}.svc.cluster.local 29 | issuerRef: 30 | kind: Issuer 31 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-selfsigned-issuer"))) | printf "%s-selfsigned-issuer" }} 32 | secretName: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager-cert"))) | printf "%s-controller-manager-cert" }} 33 | --- 34 | apiVersion: cert-manager.io/v1 35 | kind: Issuer 36 | metadata: 37 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-selfsigned-issuer"))) | printf "%s-selfsigned-issuer" }} 38 | namespace: {{ .Release.Namespace }} 39 | annotations: 40 | "helm.sh/hook": post-install,post-upgrade 41 | "helm.sh/hook-weight": "1" 42 | spec: 43 | selfSigned: {} 44 | {{- end }} 45 | -------------------------------------------------------------------------------- /chart/operator/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | kind: ConfigMap 17 | metadata: 18 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-config"))) | printf "%s-manager-config" }} 19 | namespace: {{ .Release.Namespace }} 20 | apiVersion: v1 21 | data: 22 | controller_manager_config.yaml: | 23 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 24 | # license agreements. See the NOTICE file distributed with 25 | # this work for additional information regarding copyright 26 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 27 | # the Apache License, Version 2.0 (the "License"); you may 28 | # not use this file except in compliance with the License. 29 | # You may obtain a copy of the License at 30 | # 31 | # http://www.apache.org/licenses/LICENSE-2.0 32 | # 33 | # Unless required by applicable law or agreed to in writing, 34 | # software distributed under the License is distributed on an 35 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 36 | # KIND, either express or implied. See the License for the 37 | # specific language governing permissions and limitations 38 | # under the License. 39 | # 40 | apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 41 | kind: ControllerManagerConfig 42 | health: 43 | healthProbeBindAddress: :8081 44 | {{- if .Values.webhook.enabled }} 45 | metrics: 46 | bindAddress: 127.0.0.1:8080 47 | {{- end }} 48 | {{- if .Values.webhook.enabled }} 49 | webhook: 50 | port: {{ .Values.webhook.service.port }} 51 | {{- end }} 52 | leaderElection: 53 | leaderElect: true 54 | resourceName: v1alpha1.swck.skywalking.apache.org 55 | -------------------------------------------------------------------------------- /chart/operator/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-operator"))) | printf "%s-operator" }} 20 | namespace: {{ .Release.Namespace }} 21 | labels: 22 | control-plane: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 23 | {{- include "operator.labels" . | nindent 4 }} 24 | spec: 25 | replicas: {{ .Values.replicaCount }} 26 | selector: 27 | matchLabels: 28 | control-plane: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 29 | {{- include "operator.selectorLabels" . | nindent 6 }} 30 | template: 31 | metadata: 32 | labels: 33 | control-plane: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 34 | {{- include "operator.selectorLabels" . | nindent 8 }} 35 | spec: 36 | containers: 37 | - args: 38 | - --config=controller_manager_config.yaml 39 | command: 40 | - /manager 41 | image: {{ .Values.image.repository }}:{{ required "operator.image.tag is required" .Values.image.tag }} 42 | imagePullPolicy: {{ .Values.image.pullPolicy }} 43 | livenessProbe: 44 | httpGet: 45 | path: /healthz 46 | port: 8081 47 | initialDelaySeconds: 15 48 | periodSeconds: 20 49 | name: manager 50 | {{- if .Values.webhook.enabled }} 51 | ports: 52 | - containerPort: {{ .Values.webhook.service.port }} 53 | name: webhook-server 54 | protocol: TCP 55 | {{- end }} 56 | readinessProbe: 57 | httpGet: 58 | path: /readyz 59 | port: 8081 60 | initialDelaySeconds: 5 61 | periodSeconds: 10 62 | resources: 63 | {{- toYaml .Values.resources | nindent 12 }} 64 | securityContext: 65 | {{- toYaml .Values.securityContext | nindent 10 }} 66 | volumeMounts: 67 | {{- if .Values.webhook.enabled }} 68 | - mountPath: /tmp/k8s-webhook-server/serving-certs 69 | name: cert 70 | readOnly: true 71 | {{- end }} 72 | - mountPath: /controller_manager_config.yaml 73 | name: manager-config 74 | subPath: controller_manager_config.yaml 75 | - args: 76 | {{- if .Values.metrics.enabled }} 77 | - --secure-listen-address=0.0.0.0:{{ .Values.metrics.service.port }} 78 | {{- end }} 79 | - --upstream=http://127.0.0.1:8080/ 80 | - --logtostderr=true 81 | - --v=10 82 | image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 83 | name: kube-rbac-proxy 84 | {{- if .Values.metrics.enabled }} 85 | ports: 86 | - containerPort: {{ .Values.metrics.service.port }} 87 | name: https 88 | protocol: TCP 89 | {{- end }} 90 | securityContext: 91 | runAsNonRoot: true 92 | serviceAccountName: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 93 | terminationGracePeriodSeconds: 10 94 | volumes: 95 | {{- if .Values.webhook.enabled }} 96 | - name: cert 97 | secret: 98 | defaultMode: 420 99 | secretName: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager-cert"))) | printf "%s-controller-manager-cert" }} 100 | {{- end }} 101 | - configMap: 102 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-config"))) | printf "%s-manager-config" }} 103 | name: manager-config 104 | {{- with .Values.affinity }} 105 | affinity: 106 | {{- toYaml . | nindent 8 }} 107 | {{- end }} 108 | -------------------------------------------------------------------------------- /chart/operator/templates/java-agent-configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.webhook.enabled }} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-java-agent-configmap"))) | printf "%s-java-agent-configmap" }} 6 | namespace: {{ .Release.Namespace }} 7 | data: 8 | agent.config: |- 9 | # The service name in UI 10 | agent.service_name=${SW_AGENT_NAME:Your_ApplicationName} 11 | 12 | # Backend service addresses. 13 | collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:11800} 14 | 15 | # Please refer to https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/configurations/#table-of-agent-configuration-properties to get more details. 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /chart/operator/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v1 17 | kind: ServiceAccount 18 | metadata: 19 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 20 | namespace: {{ .Release.Namespace }} 21 | --- 22 | apiVersion: rbac.authorization.k8s.io/v1 23 | kind: Role 24 | metadata: 25 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-leader-election-role"))) | printf "%s-leader-election-role" }} 26 | namespace: {{ .Release.Namespace }} 27 | rules: 28 | - apiGroups: 29 | - "" 30 | resources: 31 | - configmaps 32 | verbs: 33 | - get 34 | - list 35 | - watch 36 | - create 37 | - update 38 | - patch 39 | - delete 40 | - apiGroups: 41 | - coordination.k8s.io 42 | resources: 43 | - leases 44 | verbs: 45 | - get 46 | - list 47 | - watch 48 | - create 49 | - update 50 | - patch 51 | - delete 52 | - apiGroups: 53 | - "" 54 | resources: 55 | - events 56 | verbs: 57 | - create 58 | - patch 59 | --- 60 | apiVersion: rbac.authorization.k8s.io/v1 61 | kind: ClusterRole 62 | metadata: 63 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-role"))) | printf "%s-manager-role" }} 64 | rules: 65 | - apiGroups: 66 | - certificates.k8s.io 67 | resourceNames: 68 | - kubernetes.io/* 69 | resources: 70 | - signers 71 | verbs: 72 | - approve 73 | - apiGroups: 74 | - "" 75 | resources: 76 | - configmaps 77 | verbs: 78 | - create 79 | - delete 80 | - get 81 | - list 82 | - patch 83 | - update 84 | - watch 85 | - apiGroups: 86 | - "" 87 | resources: 88 | - events 89 | verbs: 90 | - create 91 | - patch 92 | - apiGroups: 93 | - "" 94 | resources: 95 | - persistentvolumeclaims 96 | - serviceaccounts 97 | - services 98 | verbs: 99 | - create 100 | - delete 101 | - get 102 | - list 103 | - patch 104 | - update 105 | - watch 106 | - apiGroups: 107 | - "" 108 | resources: 109 | - pods 110 | verbs: 111 | - create 112 | - get 113 | - list 114 | - patch 115 | - update 116 | - watch 117 | - apiGroups: 118 | - "" 119 | resources: 120 | - secrets 121 | - serviceaccounts 122 | - services 123 | verbs: 124 | - create 125 | - delete 126 | - get 127 | - list 128 | - patch 129 | - update 130 | - watch 131 | - apiGroups: 132 | - "" 133 | resources: 134 | - serviceaccounts 135 | - services 136 | verbs: 137 | - create 138 | - delete 139 | - get 140 | - list 141 | - patch 142 | - update 143 | - watch 144 | - apiGroups: 145 | - apps 146 | resources: 147 | - deployments 148 | verbs: 149 | - create 150 | - delete 151 | - get 152 | - list 153 | - patch 154 | - update 155 | - watch 156 | - apiGroups: 157 | - apps 158 | resources: 159 | - statefulsets 160 | verbs: 161 | - create 162 | - delete 163 | - get 164 | - list 165 | - patch 166 | - update 167 | - watch 168 | - apiGroups: 169 | - certificates.k8s.io 170 | resources: 171 | - certificatesigningrequests 172 | verbs: 173 | - create 174 | - delete 175 | - get 176 | - list 177 | - watch 178 | - apiGroups: 179 | - certificates.k8s.io 180 | resources: 181 | - certificatesigningrequests/approval 182 | verbs: 183 | - update 184 | - apiGroups: 185 | - coordination.k8s.io 186 | resources: 187 | - leases 188 | verbs: 189 | - create 190 | - get 191 | - update 192 | - apiGroups: 193 | - networking.k8s.io 194 | resources: 195 | - ingresses 196 | verbs: 197 | - create 198 | - delete 199 | - get 200 | - list 201 | - patch 202 | - update 203 | - watch 204 | - apiGroups: 205 | - operator.skywalking.apache.org 206 | resources: 207 | - banyandbs 208 | verbs: 209 | - create 210 | - delete 211 | - get 212 | - list 213 | - patch 214 | - update 215 | - watch 216 | - apiGroups: 217 | - operator.skywalking.apache.org 218 | resources: 219 | - banyandbs/finalizers 220 | verbs: 221 | - update 222 | - apiGroups: 223 | - operator.skywalking.apache.org 224 | resources: 225 | - banyandbs/status 226 | verbs: 227 | - get 228 | - patch 229 | - update 230 | - apiGroups: 231 | - operator.skywalking.apache.org 232 | resources: 233 | - fetchers 234 | verbs: 235 | - create 236 | - delete 237 | - get 238 | - list 239 | - patch 240 | - update 241 | - watch 242 | - apiGroups: 243 | - operator.skywalking.apache.org 244 | resources: 245 | - fetchers/status 246 | verbs: 247 | - get 248 | - patch 249 | - update 250 | - apiGroups: 251 | - operator.skywalking.apache.org 252 | resources: 253 | - javaagents 254 | verbs: 255 | - create 256 | - delete 257 | - get 258 | - list 259 | - patch 260 | - update 261 | - watch 262 | - apiGroups: 263 | - operator.skywalking.apache.org 264 | resources: 265 | - javaagents/status 266 | verbs: 267 | - delete 268 | - get 269 | - patch 270 | - update 271 | - apiGroups: 272 | - operator.skywalking.apache.org 273 | resources: 274 | - oapserverconfigs 275 | verbs: 276 | - create 277 | - delete 278 | - get 279 | - list 280 | - patch 281 | - update 282 | - watch 283 | - apiGroups: 284 | - operator.skywalking.apache.org 285 | resources: 286 | - oapserverconfigs/status 287 | verbs: 288 | - get 289 | - patch 290 | - update 291 | - apiGroups: 292 | - operator.skywalking.apache.org 293 | resources: 294 | - oapserverdynamicconfigs 295 | verbs: 296 | - create 297 | - delete 298 | - get 299 | - list 300 | - patch 301 | - update 302 | - watch 303 | - apiGroups: 304 | - operator.skywalking.apache.org 305 | resources: 306 | - oapserverdynamicconfigs/status 307 | verbs: 308 | - get 309 | - patch 310 | - update 311 | - apiGroups: 312 | - operator.skywalking.apache.org 313 | resources: 314 | - oapservers 315 | verbs: 316 | - create 317 | - delete 318 | - get 319 | - list 320 | - patch 321 | - update 322 | - watch 323 | - apiGroups: 324 | - operator.skywalking.apache.org 325 | resources: 326 | - oapservers/status 327 | verbs: 328 | - get 329 | - patch 330 | - update 331 | - apiGroups: 332 | - operator.skywalking.apache.org 333 | resources: 334 | - satellites 335 | verbs: 336 | - create 337 | - delete 338 | - get 339 | - list 340 | - patch 341 | - update 342 | - watch 343 | - apiGroups: 344 | - operator.skywalking.apache.org 345 | resources: 346 | - satellites/finalizers 347 | verbs: 348 | - update 349 | - apiGroups: 350 | - operator.skywalking.apache.org 351 | resources: 352 | - satellites/status 353 | verbs: 354 | - get 355 | - patch 356 | - update 357 | - apiGroups: 358 | - operator.skywalking.apache.org 359 | resources: 360 | - storages 361 | verbs: 362 | - create 363 | - delete 364 | - get 365 | - list 366 | - patch 367 | - update 368 | - watch 369 | - apiGroups: 370 | - operator.skywalking.apache.org 371 | resources: 372 | - storages/status 373 | verbs: 374 | - get 375 | - patch 376 | - update 377 | - apiGroups: 378 | - operator.skywalking.apache.org 379 | resources: 380 | - swagents 381 | verbs: 382 | - create 383 | - delete 384 | - get 385 | - list 386 | - patch 387 | - update 388 | - watch 389 | - apiGroups: 390 | - operator.skywalking.apache.org 391 | resources: 392 | - swagents/finalizers 393 | verbs: 394 | - update 395 | - apiGroups: 396 | - operator.skywalking.apache.org 397 | resources: 398 | - swagents/status 399 | verbs: 400 | - get 401 | - patch 402 | - update 403 | - apiGroups: 404 | - operator.skywalking.apache.org 405 | resources: 406 | - uis 407 | verbs: 408 | - create 409 | - delete 410 | - get 411 | - list 412 | - patch 413 | - update 414 | - watch 415 | - apiGroups: 416 | - operator.skywalking.apache.org 417 | resources: 418 | - uis/status 419 | verbs: 420 | - get 421 | - patch 422 | - update 423 | - apiGroups: 424 | - rbac.authorization.k8s.io 425 | resources: 426 | - clusterrolebindings 427 | - clusterroles 428 | verbs: 429 | - '*' 430 | --- 431 | apiVersion: rbac.authorization.k8s.io/v1 432 | kind: ClusterRole 433 | metadata: 434 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-metrics-reader"))) | printf "%s-metrics-reader" }} 435 | rules: 436 | - nonResourceURLs: 437 | - /metrics 438 | verbs: 439 | - get 440 | --- 441 | apiVersion: rbac.authorization.k8s.io/v1 442 | kind: ClusterRole 443 | metadata: 444 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-proxy-role"))) | printf "%s-proxy-role" }} 445 | rules: 446 | - apiGroups: 447 | - authentication.k8s.io 448 | resources: 449 | - tokenreviews 450 | verbs: 451 | - create 452 | - apiGroups: 453 | - authorization.k8s.io 454 | resources: 455 | - subjectaccessreviews 456 | verbs: 457 | - create 458 | --- 459 | apiVersion: rbac.authorization.k8s.io/v1 460 | kind: RoleBinding 461 | metadata: 462 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-leader-election-role"))) | printf "%s-leader-election-role" }}binding 463 | namespace: {{ .Release.Namespace }} 464 | roleRef: 465 | apiGroup: rbac.authorization.k8s.io 466 | kind: Role 467 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-leader-election-role"))) | printf "%s-leader-election-role" }} 468 | subjects: 469 | - kind: ServiceAccount 470 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 471 | namespace: {{ .Release.Namespace }} 472 | --- 473 | apiVersion: rbac.authorization.k8s.io/v1 474 | kind: ClusterRoleBinding 475 | metadata: 476 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-role"))) | printf "%s-manager-role" }}binding 477 | roleRef: 478 | apiGroup: rbac.authorization.k8s.io 479 | kind: ClusterRole 480 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-role"))) | printf "%s-manager-role" }} 481 | subjects: 482 | - kind: ServiceAccount 483 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 484 | namespace: {{ .Release.Namespace }} 485 | --- 486 | apiVersion: rbac.authorization.k8s.io/v1 487 | kind: ClusterRoleBinding 488 | metadata: 489 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-proxy-rolebinding"))) | printf "%s-proxy-rolebinding" }} 490 | roleRef: 491 | apiGroup: rbac.authorization.k8s.io 492 | kind: ClusterRole 493 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-proxy-role"))) | printf "%s-proxy-role" }} 494 | subjects: 495 | - kind: ServiceAccount 496 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 497 | namespace: {{ .Release.Namespace }} 498 | --- 499 | apiVersion: rbac.authorization.k8s.io/v1 500 | kind: ClusterRoleBinding 501 | metadata: 502 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-metrics-reader"))) | printf "%s-metrics-reader" }}-rolebinding 503 | roleRef: 504 | apiGroup: rbac.authorization.k8s.io 505 | kind: ClusterRole 506 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-metrics-reader"))) | printf "%s-metrics-reader" }} 507 | subjects: 508 | - kind: ServiceAccount 509 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 510 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /chart/operator/templates/service.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.metrics.enabled }} 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | labels: 21 | control-plane: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 22 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager-metrics-service"))) | printf "%s-controller-manager-metrics-service" }} 23 | namespace: {{ .Release.Namespace }} 24 | spec: 25 | ports: 26 | - name: https 27 | port: {{ .Values.metrics.service.port }} 28 | protocol: TCP 29 | targetPort: https 30 | selector: 31 | control-plane: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 32 | {{- end }} 33 | --- 34 | {{- if .Values.webhook.enabled }} 35 | apiVersion: v1 36 | kind: Service 37 | metadata: 38 | name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-webhook-service"))) | printf "%s-webhook-service" }} 39 | namespace: {{ .Release.Namespace }} 40 | spec: 41 | ports: 42 | - port: 443 43 | protocol: TCP 44 | targetPort: {{ .Values.webhook.service.port }} 45 | selector: 46 | control-plane: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }} 47 | {{- end }} 48 | -------------------------------------------------------------------------------- /chart/operator/values.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Default values for skywalking-swck. 17 | # This is a YAML-formatted file. 18 | # Declare variables to be passed into your templates. 19 | 20 | replicas: 1 21 | 22 | serviceAccountName: skywalking-swck-controller-manager 23 | image: 24 | repository: docker.io/apache/skywalking-swck 25 | pullPolicy: IfNotPresent 26 | tag: "v0.9.0" 27 | securityContext: 28 | allowPrivilegeEscalation: false 29 | metrics: 30 | enabled: true 31 | service: 32 | port: 8443 33 | # install crds 34 | crds: 35 | install: true 36 | # enable webhook. 37 | webhook: 38 | # If set to false, java agent injector is disabled. 39 | enabled: true 40 | service: 41 | port: 9443 42 | resources: 43 | # We usually recommend not to specify default resources and to leave this as a conscious 44 | # choice for the user. This also increases chances charts run on environments with little 45 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 46 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 47 | limits: 48 | cpu: 200m 49 | memory: 300Mi 50 | requests: 51 | cpu: 200m 52 | memory: 300Mi 53 | affinity: {} 54 | 55 | nameOverride: "" 56 | fullnameOverride: "" 57 | 58 | cert-manager: 59 | enabled: false 60 | installCRDs: true 61 | -------------------------------------------------------------------------------- /chart/skywalking/.helmignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Patterns to ignore when building packages. 17 | # This supports shell glob matching, relative path matching, and 18 | # negation (prefixed with !). Only one pattern per line. 19 | .DS_Store 20 | # Common VCS dirs 21 | .git/ 22 | .gitignore 23 | .bzr/ 24 | .bzrignore 25 | .hg/ 26 | .hgignore 27 | .svn/ 28 | # Common backup files 29 | *.swp 30 | *.bak 31 | *.tmp 32 | *~ 33 | # Various IDEs 34 | .project 35 | .idea/ 36 | *.tmproj 37 | OWNERS 38 | -------------------------------------------------------------------------------- /chart/skywalking/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v2 17 | name: skywalking-helm 18 | home: https://skywalking.apache.org 19 | version: 4.7.0 20 | description: Helm Chart for Apache SkyWalking 21 | icon: https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg 22 | sources: 23 | - https://github.com/apache/skywalking-helm 24 | maintainers: 25 | - name: hanahmily 26 | email: hanahmily@gmail.com 27 | - name: innerpeacez 28 | email: innerpeace.zhai@gmail.com 29 | - name: kezhenxu94 30 | email: kezhenxu94@163.com 31 | 32 | dependencies: 33 | - name: elasticsearch 34 | version: ~7.17.1 35 | repository: https://helm.elastic.co/ 36 | condition: elasticsearch.enabled 37 | - name: postgresql 38 | version: 12.1.2 39 | repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami 40 | condition: postgresql.enabled 41 | - name: skywalking-banyandb-helm 42 | alias: banyandb 43 | version: 0.5.0-rc0 44 | repository: oci://registry-1.docker.io/apache 45 | condition: banyandb.enabled 46 | -------------------------------------------------------------------------------- /chart/skywalking/OWNERS: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | approvers: 17 | - hanahmily 18 | - wu-sheng 19 | - innerpeacez 20 | reviewers: 21 | - hanahmily 22 | - wu-sheng 23 | - innerpeacez -------------------------------------------------------------------------------- /chart/skywalking/templates/NOTES.txt: -------------------------------------------------------------------------------- 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 | ************************************************************************ 19 | * * 20 | * SkyWalking Helm Chart by SkyWalking Team * 21 | * * 22 | ************************************************************************ 23 | 24 | Thank you for installing {{ .Chart.Name }}. 25 | 26 | Your release is named {{ .Release.Name }}. 27 | 28 | Learn more, please visit https://skywalking.apache.org/ 29 | 30 | Get the UI URL by running these commands: 31 | {{- if .Values.ui.ingress.enabled }} 32 | {{- range .Values.ui.ingress.hosts }} 33 | http{{ if $.Values.ui.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ui.ingress.path }} 34 | {{- end }} 35 | {{- else if contains "NodePort" .Values.ui.service.type }} 36 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "skywalking.ui.fullname" . }}) 37 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 38 | echo http://$NODE_IP:$NODE_PORT 39 | {{- else if contains "LoadBalancer" .Values.ui.service.type }} 40 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 41 | You can watch the status of by running 'kubectl get svc -w {{ include "skywalking.ui.fullname" . }} -n {{ .Release.Namespace }}' 42 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "skywalking.ui.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 43 | echo http://$SERVICE_IP:{{ .Values.ui.service.externalPort }} 44 | {{- else if contains "ClusterIP" .Values.ui.service.type }} 45 | echo "Visit http://127.0.0.1:8080 to use your application" 46 | kubectl port-forward svc/{{ include "skywalking.ui.fullname" . }} 8080:{{ .Values.ui.service.externalPort }} --namespace {{ .Release.Namespace }} 47 | {{- end }} 48 | 49 | {{- if .Values.elasticsearch.enabled }} 50 | {{- if .Values.elasticsearch.persistence.enabled }} 51 | {{- else }} 52 | ################################################################################# 53 | ###### WARNING: Persistence is disabled!!! You will lose your data when ##### 54 | ###### the SkyWalking's storage ES pod is terminated. ##### 55 | ################################################################################# 56 | {{- end }} 57 | {{- end }} 58 | -------------------------------------------------------------------------------- /chart/skywalking/templates/_helpers.tpl: -------------------------------------------------------------------------------- 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 | {{/* vim: set filetype=mustache: */}} 19 | {{/* 20 | Expand the name of the chart. 21 | */}} 22 | {{- define "skywalking.name" -}} 23 | {{- default .Release.Name | trunc 63 | trimSuffix "-" -}} 24 | {{- end -}} 25 | 26 | {{/* 27 | Create a default fully qualified app name. 28 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 29 | */}} 30 | {{- define "skywalking.fullname" -}} 31 | {{- if .Values.fullnameOverride -}} 32 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 33 | {{- else -}} 34 | {{- $name := default .Chart.Name .Values.nameOverride -}} 35 | {{- if contains $name .Release.Name -}} 36 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 37 | {{- else -}} 38 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 39 | {{- end -}} 40 | {{- end -}} 41 | {{- end -}} 42 | 43 | {{/* 44 | Create a default fully qualified oap name. 45 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 46 | */}} 47 | {{- define "skywalking.oap.fullname" -}} 48 | {{ template "skywalking.fullname" . }}-{{ .Values.oap.name }} 49 | {{- end -}} 50 | 51 | {{/* 52 | Create a oap full labels value. 53 | */}} 54 | {{- define "skywalking.oap.labels" -}} 55 | app={{ template "skywalking.name" . }},release={{ .Release.Name }},component={{ .Values.oap.name }} 56 | {{- end -}} 57 | 58 | {{/* 59 | Create a default fully qualified ui name. 60 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 61 | */}} 62 | {{- define "skywalking.ui.fullname" -}} 63 | {{ template "skywalking.fullname" . }}-{{ .Values.ui.name }} 64 | {{- end -}} 65 | 66 | {{/* 67 | Create a default fully qualified satellite name. 68 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 69 | */}} 70 | {{- define "skywalking.satellite.fullname" -}} 71 | {{ template "skywalking.fullname" . }}-{{ .Values.satellite.name }} 72 | {{- end -}} 73 | 74 | {{/* 75 | Create the name of the service account to use for the oap cluster 76 | */}} 77 | {{- define "skywalking.serviceAccountName.oap" -}} 78 | {{- if .Values.serviceAccounts.oap.create -}} 79 | {{ default (include "skywalking.oap.fullname" .) .Values.serviceAccounts.oap.name }} 80 | {{- else -}} 81 | {{ default "default" .Values.serviceAccounts.oap.name }} 82 | {{- end -}} 83 | {{- end -}} 84 | 85 | {{/* 86 | Create the name of the service account to use for the satellite cluster 87 | */}} 88 | {{- define "skywalking.serviceAccountName.satellite" -}} 89 | {{ default (include "skywalking.satellite.fullname" .) .Values.serviceAccounts.satellite }} 90 | {{- end -}} 91 | 92 | {{- define "skywalking.containers.wait-for-storage" -}} 93 | {{- if eq .Values.oap.storageType "elasticsearch" }} 94 | - name: wait-for-elasticsearch 95 | image: {{ .Values.initContainer.image }}:{{ .Values.initContainer.tag }} 96 | imagePullPolicy: IfNotPresent 97 | {{- if .Values.elasticsearch.enabled }} 98 | command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ .Values.elasticsearch.clusterName }}-{{ .Values.elasticsearch.nodeGroup }} {{ .Values.elasticsearch.httpPort }} && exit 0 || sleep 5; done; exit 1'] 99 | {{- else }} 100 | command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ .Values.elasticsearch.config.host }} {{ .Values.elasticsearch.config.port.http }} && exit 0 || sleep 5; done; exit 1'] 101 | {{- end }} 102 | {{- else if eq .Values.oap.storageType "postgresql" -}} 103 | - name: wait-for-postgresql 104 | image: postgres:13 105 | imagePullPolicy: IfNotPresent 106 | command: 107 | - sh 108 | - -c 109 | - | 110 | {{- if .Values.postgresql.enabled }} 111 | until pg_isready -h '{{ template "skywalking.name" . }}-postgresql' -p '{{ .Values.postgresql.containerPorts.postgresql }}' -U '{{ .Values.postgresql.auth.username }}'; do 112 | {{- else }} 113 | until pg_isready -h '{{ .Values.postgresql.config.host }}' -p '{{ .Values.postgresql.containerPorts.postgresql }}' -U '{{ .Values.postgresql.auth.username }}'; do 114 | {{- end }} 115 | echo "Waiting for postgresql..." 116 | sleep 3 117 | done 118 | {{- else if eq .Values.oap.storageType "banyandb" -}} 119 | {{- $address := .Values.banyandb.config.httpAddress -}} 120 | {{- if .Values.banyandb.enabled -}} 121 | {{- $address = printf "%s-http:%s" (include "skywalking.banyandb.fullname" .) (include "skywalking.banyandb.httpPort" .) -}} 122 | {{- end }} 123 | - name: wait-for-banyandb 124 | image: curlimages/curl 125 | imagePullPolicy: IfNotPresent 126 | command: ['sh', '-c', 'for i in $(seq 1 60); do curl -k {{ $address }}/api/healthz && exit 0 || sleep 5; done; exit 1'] 127 | {{- end }} 128 | {{- end -}} 129 | 130 | # Storage-related environment variables are defined here. 131 | {{- define "skywalking.oap.envs.storage" -}} 132 | - name: SW_STORAGE 133 | value: {{ required "oap.storageType is required" .Values.oap.storageType }} 134 | {{- if eq .Values.oap.storageType "elasticsearch" }} 135 | - name: SW_STORAGE_ES_CLUSTER_NODES 136 | {{- if .Values.elasticsearch.enabled }} 137 | value: "{{ .Values.elasticsearch.clusterName }}-{{ .Values.elasticsearch.nodeGroup }}:{{ .Values.elasticsearch.httpPort }}" 138 | {{- else }} 139 | value: "{{ .Values.elasticsearch.config.host }}:{{ .Values.elasticsearch.config.port.http }}" 140 | {{- end }} 141 | {{- if not .Values.elasticsearch.enabled }} 142 | {{- if .Values.elasticsearch.config.user }} 143 | - name: SW_ES_USER 144 | value: "{{ .Values.elasticsearch.config.user }}" 145 | {{- end }} 146 | {{- if .Values.elasticsearch.config.password }} 147 | - name: SW_ES_PASSWORD 148 | value: "{{ .Values.elasticsearch.config.password }}" 149 | {{- end }} 150 | {{- end }} 151 | {{- else if eq .Values.oap.storageType "postgresql" }} 152 | {{- $postgresqlHost := print (include "skywalking.name" .) "-postgresql" -}} 153 | {{- if not .Values.postgresql.enabled -}} 154 | {{- $postgresqlHost = .Values.postgresql.config.host -}} 155 | {{- end }} 156 | - name: SW_JDBC_URL 157 | value: "jdbc:postgresql://{{ $postgresqlHost }}:{{ .Values.postgresql.containerPorts.postgresql }}/{{ .Values.postgresql.auth.database }}" 158 | - name: SW_DATA_SOURCE_USER 159 | value: "{{ .Values.postgresql.auth.username }}" 160 | - name: SW_DATA_SOURCE_PASSWORD 161 | value: "{{ .Values.postgresql.auth.password }}" 162 | {{- else if eq .Values.oap.storageType "banyandb" }} 163 | {{- $targets := .Values.banyandb.config.grpcAddress -}} 164 | {{- if .Values.banyandb.enabled -}} 165 | {{- $targets = printf "%s-grpc:%s" (include "skywalking.banyandb.fullname" .) (include "skywalking.banyandb.grpcPort" .) -}} 166 | {{- end }} 167 | - name: SW_STORAGE_BANYANDB_TARGETS 168 | value: "{{ $targets }}" 169 | {{- end }} 170 | {{- end -}} 171 | 172 | {{/* 173 | Expand the name of the banyandb chart. 174 | */}} 175 | {{- define "skywalking.banyandb.name" -}} 176 | {{- default "skywalking-banyandb-helm" .Values.banyandb.nameOverride | trunc 63 | trimSuffix "-" -}} 177 | {{- end -}} 178 | 179 | 180 | {{/* 181 | Create a default fully qualified app name. 182 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 183 | If release name contains chart name it will be used as a full name. 184 | */}} 185 | {{- define "skywalking.banyandb.fullname" -}} 186 | {{- if .Values.banyandb.fullnameOverride -}} 187 | {{- .Values.banyandb.fullnameOverride | trunc 63 | trimSuffix "-" -}} 188 | {{- else -}} 189 | {{- $name := (include "skywalking.banyandb.name" .) -}} 190 | {{- if contains $name .Release.Name -}} 191 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 192 | {{- else -}} 193 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 194 | {{- end -}} 195 | {{- end -}} 196 | {{- end -}} 197 | 198 | {{/* 199 | Define the banyandb http port 200 | */}} 201 | {{- define "skywalking.banyandb.httpPort" -}} 202 | {{- if .Values.banyandb.standalone.enabled -}} 203 | {{- .Values.banyandb.standalone.httpSvc.port -}} 204 | {{- else if .Values.banyandb.cluster.enabled -}} 205 | {{- .Values.banyandb.cluster.liaison.httpSvc.port -}} 206 | {{- end -}} 207 | {{- end -}} 208 | 209 | {{/* 210 | Define the banyandb grpc port 211 | */}} 212 | {{- define "skywalking.banyandb.grpcPort" -}} 213 | {{- if .Values.banyandb.standalone.enabled -}} 214 | {{- .Values.banyandb.standalone.grpcSvc.port -}} 215 | {{- else if .Values.banyandb.cluster.enabled -}} 216 | {{- .Values.banyandb.cluster.liaison.grpcSvc.port -}} 217 | {{- end -}} 218 | {{- end -}} 219 | -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-clusterrole.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.serviceAccounts.oap.create }} 17 | kind: ClusterRole 18 | apiVersion: rbac.authorization.k8s.io/v1 19 | metadata: 20 | name: {{ template "skywalking.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 24 | release: "{{ .Release.Name }}" 25 | heritage: "{{ .Release.Service }}" 26 | rules: 27 | - apiGroups: [""] 28 | resources: ["pods", "pods/log", "endpoints", "services", "nodes", "namespaces", "configmaps"] 29 | verbs: ["get", "watch", "list"] 30 | - apiGroups: ["extensions"] 31 | resources: ["deployments", "replicasets"] 32 | verbs: ["get", "watch", "list"] 33 | - apiGroups: ["networking.istio.io"] 34 | resources: ["serviceentries"] 35 | verbs: ["get", "watch", "list"] 36 | {{- end }} 37 | -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.serviceAccounts.oap.create }} 17 | apiVersion: rbac.authorization.k8s.io/v1 18 | kind: ClusterRoleBinding 19 | metadata: 20 | name: {{ template "skywalking.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 24 | release: "{{ .Release.Name }}" 25 | heritage: "{{ .Release.Service }}" 26 | roleRef: 27 | apiGroup: rbac.authorization.k8s.io 28 | kind: ClusterRole 29 | name: {{ template "skywalking.fullname" . }} 30 | subjects: 31 | - kind: ServiceAccount 32 | name: {{ template "skywalking.serviceAccountName.oap" . }} 33 | namespace: {{ .Release.Namespace }} 34 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-cm-dynamic.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.oap.dynamicConfig.enabled }} 17 | apiVersion: v1 18 | kind: ConfigMap 19 | metadata: 20 | name: skywalking-dynamic-config 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | release: {{ .Release.Name }} 24 | component: {{ .Values.oap.name }} 25 | data: 26 | {{ toYaml .Values.oap.dynamicConfig.config | indent 2 }} 27 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-cm-override.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.oap.config }} 17 | apiVersion: v1 18 | kind: ConfigMap 19 | metadata: 20 | name: {{ template "skywalking.fullname" . }}-oap-cm-override 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | release: {{ .Release.Name }} 24 | component: {{ .Values.oap.name }} 25 | data: 26 | {{- range $path, $config := .Values.oap.config }} 27 | {{- if typeIs "string" $config }} 28 | {{ $path }}: | 29 | {{ $config | indent 4 }} 30 | {{- else }} 31 | {{- range $subpath, $subconfig := $config }} 32 | {{- if typeIs "string" $subconfig }} 33 | {{ print $path "-" $subpath }}: | 34 | {{ $subconfig | indent 4 }} 35 | {{- else }} 36 | {{- range $subsubpath, $subsubconfig := $subconfig }} 37 | {{ print $path "-" $subpath "-" $subsubpath }}: | 38 | {{ $subsubconfig | indent 4 }} 39 | {{- end }} 40 | {{- end }} 41 | {{- end }} 42 | {{- end }} 43 | {{- end }} 44 | {{ end }} 45 | -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-deployment.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | labels: 20 | app: {{ template "skywalking.name" . }} 21 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 22 | component: "{{ .Values.oap.name }}" 23 | heritage: {{ .Release.Service }} 24 | release: {{ .Release.Name }} 25 | name: {{ template "skywalking.oap.fullname" . }} 26 | spec: 27 | replicas: {{ .Values.oap.replicas }} 28 | selector: 29 | matchLabels: 30 | app: {{ template "skywalking.name" . }} 31 | component: "{{ .Values.oap.name }}" 32 | release: {{ .Release.Name }} 33 | template: 34 | metadata: 35 | labels: 36 | app: {{ template "skywalking.name" . }} 37 | component: "{{ .Values.oap.name }}" 38 | release: {{ .Release.Name }} 39 | {{- if .Values.oap.podAnnotations }} 40 | annotations: 41 | {{ toYaml .Values.oap.podAnnotations | indent 8 }} 42 | {{- end }} 43 | spec: 44 | serviceAccountName: {{ template "skywalking.serviceAccountName.oap" . }} 45 | {{- with .Values.oap.securityContext }} 46 | securityContext: 47 | {{- toYaml . | nindent 8 }} 48 | {{- end }} 49 | affinity: 50 | {{- if eq .Values.oap.antiAffinity "hard" }} 51 | podAntiAffinity: 52 | requiredDuringSchedulingIgnoredDuringExecution: 53 | - topologyKey: "kubernetes.io/hostname" 54 | labelSelector: 55 | matchLabels: 56 | app: "{{ template "skywalking.name" . }}" 57 | release: "{{ .Release.Name }}" 58 | component: "{{ .Values.oap.name }}" 59 | {{- else if eq .Values.oap.antiAffinity "soft" }} 60 | podAntiAffinity: 61 | preferredDuringSchedulingIgnoredDuringExecution: 62 | - weight: 1 63 | podAffinityTerm: 64 | topologyKey: kubernetes.io/hostname 65 | labelSelector: 66 | matchLabels: 67 | app: "{{ template "skywalking.name" . }}" 68 | release: "{{ .Release.Name }}" 69 | component: "{{ .Values.oap.name }}" 70 | {{- end }} 71 | {{- with .Values.oap.nodeAffinity }} 72 | nodeAffinity: 73 | {{ toYaml . | indent 10 }} 74 | {{- end }} 75 | {{- if .Values.oap.nodeSelector }} 76 | nodeSelector: 77 | {{ toYaml .Values.oap.nodeSelector | indent 8 }} 78 | {{- end }} 79 | {{- if .Values.oap.tolerations }} 80 | tolerations: 81 | {{ toYaml .Values.oap.tolerations | indent 8 }} 82 | {{- end }} 83 | {{- if .Values.imagePullSecrets }} 84 | imagePullSecrets: 85 | {{ toYaml .Values.imagePullSecrets | indent 8 }} 86 | {{- end }} 87 | initContainers: 88 | {{- include "skywalking.containers.wait-for-storage" . | nindent 6 }} 89 | containers: 90 | - name: {{ .Values.oap.name }} 91 | image: {{ .Values.oap.image.repository }}:{{ required "oap.image.tag is required" .Values.oap.image.tag }} 92 | imagePullPolicy: {{ .Values.oap.image.pullPolicy }} 93 | livenessProbe: 94 | {{- if .Values.oap.livenessProbe }} 95 | {{ toYaml .Values.oap.livenessProbe | indent 10 }} 96 | {{ else }} 97 | tcpSocket: 98 | port: 12800 99 | initialDelaySeconds: 5 100 | periodSeconds: 10 101 | {{- end }} 102 | startupProbe: 103 | {{- if .Values.oap.startupProbe }} 104 | {{ toYaml .Values.oap.startupProbe | indent 10 }} 105 | {{ else }} 106 | tcpSocket: 107 | port: 12800 108 | failureThreshold: 9 109 | periodSeconds: 10 110 | {{- end }} 111 | readinessProbe: 112 | {{- if .Values.oap.readinessProbe }} 113 | {{ toYaml .Values.oap.readinessProbe | indent 10 }} 114 | {{ else }} 115 | tcpSocket: 116 | port: 12800 117 | initialDelaySeconds: 5 118 | periodSeconds: 10 119 | {{- end }} 120 | ports: 121 | {{- range $key, $value := .Values.oap.ports }} 122 | - containerPort: {{ $value }} 123 | name: {{ $key }} 124 | {{- end }} 125 | {{- if .Values.oap.resources }} 126 | resources: 127 | {{ toYaml .Values.oap.resources | indent 10 }} 128 | {{- end }} 129 | env: 130 | {{- if .Values.oap.ports.zipkinreceiver }} 131 | - name: SW_RECEIVER_ZIPKIN 132 | value: default 133 | - name: SW_RECEIVER_ZIPKIN_REST_PORT 134 | value: "{{ .Values.oap.ports.zipkinreceiver }}" 135 | {{- end }} 136 | {{- if .Values.oap.ports.zipkinquery }} 137 | - name: SW_QUERY_ZIPKIN 138 | value: default 139 | - name: SW_QUERY_ZIPKIN_REST_PORT 140 | value: "{{ .Values.oap.ports.zipkinquery }}" 141 | {{- end }} 142 | - name: JAVA_OPTS 143 | value: "-Dmode=no-init {{ .Values.oap.javaOpts }}" 144 | - name: SW_CLUSTER 145 | value: kubernetes 146 | - name: SW_CLUSTER_K8S_NAMESPACE 147 | value: "{{ .Release.Namespace }}" 148 | {{- if .Values.oap.dynamicConfig.enabled }} 149 | - name: SW_CONFIGURATION 150 | value: k8s-configmap 151 | - name: SW_CONFIG_CONFIGMAP_PERIOD 152 | value: "{{ .Values.oap.dynamicConfig.period }}" 153 | {{- end }} 154 | - name: SW_CLUSTER_K8S_LABEL 155 | value: "{{ template "skywalking.oap.labels" . }}" 156 | - name: SKYWALKING_COLLECTOR_UID 157 | valueFrom: 158 | fieldRef: 159 | fieldPath: metadata.uid 160 | {{- include "skywalking.oap.envs.storage" . | nindent 8 }} 161 | {{- range $key, $value := .Values.oap.env }} 162 | - name: {{ $key }} 163 | value: {{ $value | quote }} 164 | {{- end }} 165 | 166 | volumeMounts: 167 | {{- range $path, $config := .Values.oap.config }} 168 | {{- if typeIs "string" $config }} 169 | - name: skywalking-oap-override 170 | mountPath: /skywalking/config/{{ $path }} 171 | subPath: {{ $path }} 172 | {{- else }} 173 | {{- range $subpath, $subconfig := $config }} 174 | {{- if typeIs "string" $subconfig }} 175 | - name: skywalking-oap-override 176 | mountPath: /skywalking/config/{{ $path }}/{{ $subpath }} 177 | subPath: {{ print $path "-" $subpath }} 178 | {{- else }} 179 | {{- range $subsubpath, $subsubconfig := $subconfig }} 180 | - name: skywalking-oap-override 181 | mountPath: /skywalking/config/{{ $path }}/{{ $subpath }}/{{ $subsubpath }} 182 | subPath: {{ print $path "-" $subpath "-" $subsubpath }} 183 | {{- end }} 184 | {{- end }} 185 | {{- end }} 186 | {{- end }} 187 | {{- end }} 188 | {{- range .Values.oap.secretMounts }} 189 | - name: {{ .name }} 190 | mountPath: {{ .path }} 191 | {{- if .subPath }} 192 | subPath: {{ .subPath }} 193 | {{- end }} 194 | {{- end }} 195 | 196 | volumes: 197 | {{- if .Values.oap.config }} 198 | - name: skywalking-oap-override 199 | configMap: 200 | name: {{ template "skywalking.fullname" . }}-oap-cm-override 201 | {{- end }} 202 | {{- range .Values.oap.secretMounts }} 203 | - name: {{ .name }} 204 | secret: 205 | secretName: {{ .secretName }} 206 | {{- if .defaultMode }} 207 | defaultMode: {{ .defaultMode }} 208 | {{- end }} 209 | {{- end }} 210 | -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-init.job.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # https://docs.sentry.io/server/installation/docker/#running-migrations 17 | 18 | apiVersion: batch/v1 19 | kind: Job 20 | metadata: 21 | name: "{{ template "skywalking.oap.fullname" . }}-init" 22 | labels: 23 | app: {{ template "skywalking.name" . }} 24 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 25 | component: "{{ template "skywalking.fullname" . }}-job" 26 | heritage: {{ .Release.Service }} 27 | release: {{ .Release.Name }} 28 | annotations: 29 | "helm.sh/hook": post-install,post-upgrade,post-rollback 30 | "helm.sh/hook-weight": "1" 31 | spec: 32 | template: 33 | metadata: 34 | name: "{{ .Release.Name }}-oap-init" 35 | labels: 36 | app: {{ template "skywalking.name" . }} 37 | component: "{{ template "skywalking.fullname" . }}-job" 38 | release: {{ .Release.Name }} 39 | {{- if .Values.oapInit.extraPodLabels }} 40 | {{ toYaml .Values.oapInit.extraPodLabels | indent 8 }} 41 | {{- end }} 42 | spec: 43 | serviceAccountName: {{ template "skywalking.serviceAccountName.oap" . }} 44 | {{- with .Values.oap.securityContext }} 45 | securityContext: 46 | {{- toYaml . | nindent 8 }} 47 | {{- end }} 48 | {{- if .Values.oapInit.nodeAffinity }} 49 | affinity: 50 | {{- end }} 51 | {{- with .Values.oapInit.nodeAffinity }} 52 | nodeAffinity: 53 | {{ toYaml . | indent 10 }} 54 | {{- end }} 55 | {{- if .Values.oapInit.nodeSelector }} 56 | nodeSelector: 57 | {{ toYaml .Values.oapInit.nodeSelector | indent 8 }} 58 | {{- end }} 59 | {{- if .Values.oapInit.tolerations }} 60 | tolerations: 61 | {{ toYaml .Values.oapInit.tolerations | indent 8 }} 62 | {{- end }} 63 | {{- if .Values.imagePullSecrets }} 64 | imagePullSecrets: 65 | {{ toYaml .Values.imagePullSecrets | indent 8 }} 66 | {{- end }} 67 | restartPolicy: Never 68 | initContainers: 69 | {{- include "skywalking.containers.wait-for-storage" . | nindent 6 }} 70 | containers: 71 | - name: {{ .Values.oap.name }} 72 | image: {{ .Values.oap.image.repository }}:{{ required "oap.image.tag is required" .Values.oap.image.tag }} 73 | imagePullPolicy: {{ .Values.oap.image.pullPolicy }} 74 | {{- if .Values.oap.resources }} 75 | resources: 76 | {{ toYaml .Values.oap.resources | indent 10 }} 77 | {{- end }} 78 | env: 79 | - name: JAVA_OPTS 80 | value: "{{ .Values.oap.javaOpts }} -Dmode=init" 81 | {{- include "skywalking.oap.envs.storage" . | nindent 8 }} 82 | {{- range $key, $value := .Values.oap.env }} 83 | - name: {{ $key }} 84 | value: {{ $value | quote }} 85 | {{- end }} 86 | 87 | volumeMounts: 88 | {{- range $path, $config := .Values.oap.config }} 89 | {{- if typeIs "string" $config }} 90 | - name: skywalking-oap-override 91 | mountPath: /skywalking/config/{{ $path }} 92 | subPath: {{ $path }} 93 | {{- else }} 94 | {{- range $subpath, $oalContent := $config }} 95 | - name: skywalking-oap-override 96 | mountPath: /skywalking/config/{{ $path }}/{{ $subpath }} 97 | subPath: {{ print $path "-" $subpath }} 98 | {{- end }} 99 | {{- end }} 100 | {{- end }} 101 | {{- range .Values.oap.secretMounts }} 102 | - name: {{ .name }} 103 | mountPath: {{ .path }} 104 | {{- if .subPath }} 105 | subPath: {{ .subPath }} 106 | {{- end }} 107 | {{- end }} 108 | 109 | volumes: 110 | {{- if .Values.oap.config }} 111 | - name: skywalking-oap-override 112 | configMap: 113 | name: {{ template "skywalking.fullname" . }}-oap-cm-override 114 | {{- end }} 115 | {{- range .Values.oap.secretMounts }} 116 | - name: {{ .name }} 117 | secret: 118 | secretName: {{ .secretName }} 119 | {{- if .defaultMode }} 120 | defaultMode: {{ .defaultMode }} 121 | {{- end }} 122 | {{- end }} 123 | -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-role.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.serviceAccounts.oap.create }} 17 | kind: Role 18 | apiVersion: rbac.authorization.k8s.io/v1 19 | metadata: 20 | name: {{ template "skywalking.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 24 | release: "{{ .Release.Name }}" 25 | heritage: "{{ .Release.Service }}" 26 | rules: 27 | - apiGroups: [""] 28 | resources: ["pods","configmaps"] 29 | verbs: ["get", "watch", "list"] 30 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.serviceAccounts.oap.create }} 17 | apiVersion: rbac.authorization.k8s.io/v1 18 | kind: RoleBinding 19 | metadata: 20 | name: {{ template "skywalking.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 24 | release: "{{ .Release.Name }}" 25 | heritage: "{{ .Release.Service }}" 26 | roleRef: 27 | apiGroup: rbac.authorization.k8s.io 28 | kind: Role 29 | name: {{ template "skywalking.fullname" . }} 30 | subjects: 31 | - kind: ServiceAccount 32 | name: {{ template "skywalking.serviceAccountName.oap" . }} 33 | namespace: {{ .Release.Namespace }} 34 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.serviceAccounts.oap.create }} 17 | apiVersion: v1 18 | kind: ServiceAccount 19 | metadata: 20 | labels: 21 | app: {{ template "skywalking.name" . }} 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 23 | component: "{{ .Values.oap.name }}" 24 | heritage: {{ .Release.Service }} 25 | release: {{ .Release.Name }} 26 | name: {{ template "skywalking.serviceAccountName.oap" . }} 27 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/oap-svc.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v1 17 | kind: Service 18 | metadata: 19 | name: {{ template "skywalking.oap.fullname" . }} 20 | labels: 21 | app: {{ template "skywalking.name" . }} 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 23 | component: "{{ .Values.oap.name }}" 24 | heritage: {{ .Release.Service }} 25 | release: {{ .Release.Name }} 26 | {{- with .Values.oap.service.annotations }} 27 | annotations: 28 | {{- range $key, $value := . }} 29 | {{ $key }}: {{ $value | quote }} 30 | {{- end }} 31 | {{- end }} 32 | spec: 33 | type: {{ .Values.oap.service.type }} 34 | ports: 35 | {{- range $key, $value := .Values.oap.ports }} 36 | - port: {{ $value }} 37 | name: {{ $key }} 38 | {{- end }} 39 | selector: 40 | app: {{ template "skywalking.name" . }} 41 | component: "{{ .Values.oap.name }}" 42 | release: {{ .Release.Name }} 43 | -------------------------------------------------------------------------------- /chart/skywalking/templates/satellite-cm-override.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.satellite.config }} 17 | apiVersion: v1 18 | kind: ConfigMap 19 | metadata: 20 | name: {{ template "skywalking.fullname" . }}-satellite-cm-override 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | release: {{ .Release.Name }} 24 | component: {{ .Values.satellite.name }} 25 | data: 26 | {{- range $path, $config := .Values.satellite.config }} 27 | {{- if typeIs "string" $config }} 28 | {{ $path }}: | 29 | {{ $config | indent 4 }} 30 | {{- else }} 31 | {{- range $subpath, $subconfig := $config }} 32 | {{ print $path "-" $subpath }}: | 33 | {{ $subconfig | indent 4 }} 34 | {{- end }} 35 | {{- end }} 36 | {{- end }} 37 | {{ end }} 38 | -------------------------------------------------------------------------------- /chart/skywalking/templates/satellite-deployment.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.satellite.enabled }} 17 | apiVersion: apps/v1 18 | kind: Deployment 19 | metadata: 20 | labels: 21 | app: {{ template "skywalking.name" . }} 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 23 | component: "{{ .Values.satellite.name }}" 24 | heritage: {{ .Release.Service }} 25 | release: {{ .Release.Name }} 26 | name: {{ template "skywalking.satellite.fullname" . }} 27 | spec: 28 | replicas: {{ .Values.satellite.replicas }} 29 | selector: 30 | matchLabels: 31 | app: {{ template "skywalking.name" . }} 32 | component: "{{ .Values.satellite.name }}" 33 | release: {{ .Release.Name }} 34 | template: 35 | metadata: 36 | labels: 37 | app: {{ template "skywalking.name" . }} 38 | component: "{{ .Values.satellite.name }}" 39 | release: {{ .Release.Name }} 40 | {{- if .Values.satellite.podAnnotations }} 41 | annotations: 42 | {{ toYaml .Values.satellite.podAnnotations | indent 8 }} 43 | {{- end }} 44 | spec: 45 | serviceAccountName: {{ template "skywalking.serviceAccountName.satellite" . }} 46 | {{- with .Values.satellite.securityContext }} 47 | securityContext: 48 | {{- toYaml . | nindent 8 }} 49 | {{- end }} 50 | 51 | affinity: 52 | {{- if eq .Values.satellite.antiAffinity "hard" }} 53 | podAntiAffinity: 54 | requiredDuringSchedulingIgnoredDuringExecution: 55 | - topologyKey: "kubernetes.io/hostname" 56 | labelSelector: 57 | matchLabels: 58 | app: "{{ template "skywalking.name" . }}" 59 | release: "{{ .Release.Name }}" 60 | component: "{{ .Values.satellite.name }}" 61 | {{- else if eq .Values.satellite.antiAffinity "soft" }} 62 | podAntiAffinity: 63 | preferredDuringSchedulingIgnoredDuringExecution: 64 | - weight: 1 65 | podAffinityTerm: 66 | topologyKey: kubernetes.io/hostname 67 | labelSelector: 68 | matchLabels: 69 | app: "{{ template "skywalking.name" . }}" 70 | release: "{{ .Release.Name }}" 71 | component: "{{ .Values.satellite.name }}" 72 | {{- end }} 73 | {{- with .Values.satellite.nodeAffinity }} 74 | nodeAffinity: 75 | {{ toYaml . | indent 10 }} 76 | {{- end }} 77 | {{- if .Values.satellite.nodeSelector }} 78 | nodeSelector: 79 | {{ toYaml .Values.satellite.nodeSelector | indent 8 }} 80 | {{- end }} 81 | {{- if .Values.satellite.tolerations }} 82 | tolerations: 83 | {{ toYaml .Values.satellite.tolerations | indent 8 }} 84 | {{- end }} 85 | {{- if .Values.imagePullSecrets }} 86 | imagePullSecrets: 87 | {{ toYaml .Values.imagePullSecrets | indent 8 }} 88 | {{- end }} 89 | containers: 90 | - name: {{ .Values.satellite.name }} 91 | image: {{ .Values.satellite.image.repository }}:{{ required "satellite.image.tag is required" .Values.satellite.image.tag }} 92 | imagePullPolicy: {{ .Values.satellite.image.pullPolicy }} 93 | readinessProbe: 94 | tcpSocket: 95 | port: {{ .Values.oap.ports.grpc }} 96 | initialDelaySeconds: 15 97 | periodSeconds: 20 98 | ports: 99 | {{- range $key, $value := .Values.satellite.ports }} 100 | - containerPort: {{ $value }} 101 | name: {{ $key }} 102 | {{- end }} 103 | {{- if .Values.satellite.resources }} 104 | resources: 105 | {{ toYaml .Values.satellite.resources | indent 10 }} 106 | {{- end }} 107 | env: 108 | - name: SATELLITE_GRPC_CLIENT_FINDER 109 | value: kubernetes 110 | - name: SATELLITE_GRPC_CLIENT_KUBERNETES_NAMESPACE 111 | value: "{{ .Release.Namespace }}" 112 | - name: SATELLITE_GRPC_CLIENT_KUBERNETES_KIND 113 | value: pod 114 | - name: SATELLITE_GRPC_CLIENT_KUBERNETES_SELECTOR_LABEL 115 | value: "{{ template "skywalking.oap.labels" . }}" 116 | - name: SATELLITE_GRPC_CLIENT_KUBERNETES_EXTRA_PORT 117 | value: "{{ .Values.oap.ports.grpc }}" 118 | {{- range $key, $value := .Values.satellite.env }} 119 | - name: {{ $key }} 120 | value: {{ $value | quote }} 121 | {{- end }} 122 | 123 | volumeMounts: 124 | {{- range $path, $config := .Values.satellite.config }} 125 | {{- if typeIs "string" $config }} 126 | - name: skywalking-satellite-override 127 | mountPath: /skywalking/config/{{ $path }} 128 | subPath: {{ $path }} 129 | {{- else }} 130 | {{- range $subpath, $oalContent := $config }} 131 | - name: skywalking-satellite-override 132 | mountPath: /skywalking/config/{{ $path }}/{{ $subpath }} 133 | subPath: {{ print $path "-" $subpath }} 134 | {{- end }} 135 | {{- end }} 136 | {{- end }} 137 | 138 | volumes: 139 | {{- if .Values.satellite.config }} 140 | - name: skywalking-satellite-override 141 | configMap: 142 | name: {{ template "skywalking.fullname" . }}-satellite-cm-override 143 | {{- end }} 144 | {{- end }} 145 | -------------------------------------------------------------------------------- /chart/skywalking/templates/satellite-role.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.satellite.enabled }} 17 | kind: Role 18 | apiVersion: rbac.authorization.k8s.io/v1 19 | metadata: 20 | name: {{ template "skywalking.satellite.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | component: "{{ .Values.oap.name }}" 24 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 25 | release: "{{ .Release.Name }}" 26 | heritage: "{{ .Release.Service }}" 27 | rules: 28 | - apiGroups: [""] 29 | resources: ["pods"] 30 | verbs: ["get", "watch", "list"] 31 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/satellite-rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.satellite.enabled }} 17 | apiVersion: rbac.authorization.k8s.io/v1 18 | kind: RoleBinding 19 | metadata: 20 | name: {{ template "skywalking.satellite.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | component: "{{ .Values.oap.name }}" 24 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 25 | release: "{{ .Release.Name }}" 26 | heritage: "{{ .Release.Service }}" 27 | roleRef: 28 | apiGroup: rbac.authorization.k8s.io 29 | kind: Role 30 | name: {{ template "skywalking.satellite.fullname" . }} 31 | subjects: 32 | - kind: ServiceAccount 33 | name: {{ template "skywalking.serviceAccountName.satellite" . }} 34 | namespace: {{ .Release.Namespace }} 35 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/satellite-serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.satellite.enabled }} 17 | apiVersion: v1 18 | kind: ServiceAccount 19 | metadata: 20 | labels: 21 | app: {{ template "skywalking.name" . }} 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 23 | component: "{{ .Values.satellite.name }}" 24 | heritage: {{ .Release.Service }} 25 | release: {{ .Release.Name }} 26 | name: {{ template "skywalking.serviceAccountName.satellite" . }} 27 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/satellite-svc.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.satellite.enabled }} 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | name: {{ template "skywalking.satellite.fullname" . }} 21 | labels: 22 | app: {{ template "skywalking.name" . }} 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 24 | component: "{{ .Values.satellite.name }}" 25 | heritage: {{ .Release.Service }} 26 | release: {{ .Release.Name }} 27 | spec: 28 | type: {{ .Values.satellite.service.type }} 29 | ports: 30 | {{- range $key, $value := .Values.satellite.ports }} 31 | - port: {{ $value }} 32 | name: {{ $key }} 33 | {{- end }} 34 | selector: 35 | app: {{ template "skywalking.name" . }} 36 | component: "{{ .Values.satellite.name }}" 37 | release: {{ .Release.Name }} 38 | {{- end }} -------------------------------------------------------------------------------- /chart/skywalking/templates/ui-deployment.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: {{ template "skywalking.ui.fullname" . }} 20 | labels: 21 | app: {{ template "skywalking.name" . }} 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 23 | component: "{{ .Values.ui.name }}" 24 | heritage: {{ .Release.Service }} 25 | release: {{ .Release.Name }} 26 | spec: 27 | replicas: {{ .Values.ui.replicas }} 28 | selector: 29 | matchLabels: 30 | app: {{ template "skywalking.name" . }} 31 | component: "{{ .Values.ui.name }}" 32 | release: {{ .Release.Name }} 33 | template: 34 | metadata: 35 | labels: 36 | app: {{ template "skywalking.name" . }} 37 | component: "{{ .Values.ui.name }}" 38 | release: {{ .Release.Name }} 39 | {{- if .Values.ui.podAnnotations }} 40 | annotations: 41 | {{ toYaml .Values.ui.podAnnotations | indent 8 }} 42 | {{- end }} 43 | spec: 44 | {{- with .Values.ui.securityContext }} 45 | securityContext: 46 | {{- toYaml . | nindent 8 }} 47 | {{- end }} 48 | 49 | affinity: 50 | {{- with .Values.ui.nodeAffinity }} 51 | nodeAffinity: 52 | {{ toYaml . | indent 10 }} 53 | {{- end }} 54 | {{- if .Values.ui.nodeSelector }} 55 | nodeSelector: 56 | {{ toYaml .Values.ui.nodeSelector | indent 8 }} 57 | {{- end }} 58 | {{- if .Values.ui.tolerations }} 59 | tolerations: 60 | {{ toYaml .Values.ui.tolerations | indent 8 }} 61 | {{- end }} 62 | {{- if .Values.imagePullSecrets }} 63 | imagePullSecrets: 64 | {{ toYaml .Values.imagePullSecrets | indent 8 }} 65 | {{- end }} 66 | containers: 67 | - name: {{ .Values.ui.name }} 68 | image: {{ .Values.ui.image.repository }}:{{ required "ui.image.tag is required" .Values.ui.image.tag }} 69 | imagePullPolicy: {{ .Values.ui.image.pullPolicy }} 70 | ports: 71 | - containerPort: {{ .Values.ui.service.internalPort }} 72 | name: page 73 | {{- if .Values.ui.resources }} 74 | resources: 75 | {{ toYaml .Values.ui.resources | indent 10 }} 76 | {{- end }} 77 | env: 78 | - name: SW_OAP_ADDRESS 79 | value: "http://{{ template "skywalking.oap.fullname" . }}:{{ .Values.oap.ports.rest }}" 80 | {{- if .Values.oap.ports.zipkinquery }} 81 | - name: SW_ZIPKIN_ADDRESS 82 | value: "http://{{ template "skywalking.oap.fullname" . }}:{{ .Values.oap.ports.zipkinquery }}" 83 | {{- end }} 84 | {{- range $key, $value := .Values.ui.env }} 85 | - name: {{ $key }} 86 | value: {{ $value | quote }} 87 | {{- end }} 88 | -------------------------------------------------------------------------------- /chart/skywalking/templates/ui-ingress.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- if .Values.ui.ingress.enabled }} 17 | {{- $serviceName := include "skywalking.ui.fullname" . }} 18 | {{- $servicePort := .Values.ui.service.externalPort }} 19 | {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} 20 | apiVersion: networking.k8s.io/v1 21 | {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} 22 | apiVersion: networking.k8s.io/v1beta1 23 | {{- else }} 24 | apiVersion: extensions/v1beta1 25 | {{- end }} 26 | kind: Ingress 27 | metadata: 28 | labels: 29 | app: {{ template "skywalking.name" . }} 30 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 31 | component: "{{ .Values.ui.name }}" 32 | heritage: {{ .Release.Service }} 33 | release: {{ .Release.Name }} 34 | name: {{ template "skywalking.ui.fullname" . }} 35 | annotations: 36 | {{- range $key, $value := .Values.ui.ingress.annotations }} 37 | {{ $key }}: {{ $value | quote }} 38 | {{- end }} 39 | spec: 40 | rules: 41 | {{- range .Values.ui.ingress.hosts }} 42 | {{- $url := splitList "/" . }} 43 | - host: {{ first $url }} 44 | http: 45 | paths: 46 | - path: /{{ rest $url | join "/" }} 47 | backend: 48 | {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} 49 | service: 50 | name: {{ $serviceName }} 51 | port: 52 | number: {{ $servicePort }} 53 | {{- else }} 54 | serviceName: {{ $serviceName }} 55 | servicePort: {{ $servicePort }} 56 | {{- end }} 57 | {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} 58 | pathType: Prefix 59 | {{- end }} 60 | {{- end -}} 61 | {{- if .Values.ui.ingress.tls }} 62 | tls: 63 | {{ toYaml .Values.ui.ingress.tls | indent 4 }} 64 | {{- end -}} 65 | {{- end }} 66 | -------------------------------------------------------------------------------- /chart/skywalking/templates/ui-svc.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: v1 17 | kind: Service 18 | metadata: 19 | labels: 20 | app: {{ template "skywalking.name" . }} 21 | chart: {{ .Chart.Name }}-{{ .Chart.Version }} 22 | component: "{{ .Values.ui.name }}" 23 | heritage: {{ .Release.Service }} 24 | release: {{ .Release.Name }} 25 | name: {{ template "skywalking.ui.fullname" . }} 26 | {{- with .Values.ui.service.annotations }} 27 | annotations: 28 | {{- range $key, $value := . }} 29 | {{ $key }}: {{ $value | quote }} 30 | {{- end }} 31 | {{- end }} 32 | spec: 33 | {{- if .Values.ui.service.loadBalancerSourceRanges }} 34 | loadBalancerSourceRanges: 35 | {{- range $cidr := .Values.ui.service.loadBalancerSourceRanges }} 36 | - {{ $cidr }} 37 | {{- end }} 38 | {{- end }} 39 | type: {{ .Values.ui.service.type }} 40 | {{- if and (eq .Values.ui.service.type "ClusterIP") .Values.ui.service.clusterIP }} 41 | clusterIP: {{ .Values.ui.service.clusterIP }} 42 | {{- end }} 43 | ports: 44 | - port: {{ .Values.ui.service.externalPort }} 45 | targetPort: {{ .Values.ui.service.internalPort }} 46 | protocol: TCP 47 | {{ if (and (eq .Values.ui.service.type "NodePort") (not (empty .Values.ui.service.nodePort))) }} 48 | nodePort: {{ .Values.ui.service.nodePort }} 49 | {{ end }} 50 | {{- if .Values.ui.service.portName }} 51 | name: {{ .Values.ui.service.portName }} 52 | {{- end }} 53 | {{- if .Values.ui.service.externalIPs }} 54 | externalIPs: 55 | {{ toYaml .Values.ui.service.externalIPs | indent 4 }} 56 | {{- end }} 57 | selector: 58 | app: {{ template "skywalking.name" . }} 59 | component: "{{ .Values.ui.name }}" 60 | release: {{ .Release.Name }} 61 | {{- if .Values.ui.service.loadBalancerIP }} 62 | loadBalancerIP: {{ .Values.ui.service.loadBalancerIP }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /chart/skywalking/values-my-es.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Default values for skywalking. 17 | # This is a YAML-formatted file. 18 | # Declare variables to be passed into your templates. 19 | 20 | oap: 21 | image: 22 | tag: 10.0.0 23 | storageType: elasticsearch 24 | 25 | ui: 26 | image: 27 | tag: 10.0.0 28 | 29 | elasticsearch: 30 | enabled: false 31 | config: # For users of an existing elasticsearch cluster,takes effect when `elasticsearch.enabled` is false 32 | host: elasticsearch-es-http 33 | port: 34 | http: 9200 35 | user: "xxx" # [optional] 36 | password: "xxx" # [optional] 37 | -------------------------------------------------------------------------------- /logo/skywalking-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/skywalking-helm/ea789a5633ad02ab704ddabb92aa067ee7705b09/logo/skywalking-logo.png -------------------------------------------------------------------------------- /logo/skywalking-logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/skywalking-helm/ea789a5633ad02ab704ddabb92aa067ee7705b09/logo/skywalking-logo2.png -------------------------------------------------------------------------------- /logo/sw-logo-for-chart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/skywalking-helm/ea789a5633ad02ab704ddabb92aa067ee7705b09/logo/sw-logo-for-chart.jpg -------------------------------------------------------------------------------- /test/e2e/env: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | SW_AGENT_JAVA_COMMIT=fbdfc42b4d825ba33205d646ddaaaad20c005cb8 17 | SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07 18 | SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa 19 | SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8 20 | SW_AGENT_GO_COMMIT=4af380c2db6243106b0fc650b6003ce3b3eb82a0 21 | SW_AGENT_PYTHON_COMMIT=50388c55428d742d73d9733278f04173585de80d 22 | SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449 23 | SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016 24 | SW_KUBERNETES_COMMIT_SHA=0f3ec68e5a7e1608cec8688716b848ed15e971e5 25 | 26 | SW_CTL_COMMIT=9d2d0edccda2afe5cf24f1e632142f40e80e8fa4 27 | -------------------------------------------------------------------------------- /test/e2e/expected/dependency-services-instance-productpage.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | nodes: 17 | {{- contains .nodes }} 18 | - id: {{ notEmpty .id }} 19 | name: {{ notEmpty .name }} 20 | serviceid: {{ b64enc "e2e::reviews" }}.1 21 | servicename: e2e::reviews 22 | type: "" 23 | isreal: true 24 | - id: {{ notEmpty .id }} 25 | name: {{ notEmpty .name }} 26 | serviceid: {{ b64enc "e2e::productpage" }}.1 27 | servicename: e2e::productpage 28 | type: "" 29 | isreal: true 30 | {{- end }} 31 | calls: 32 | {{- contains .calls }} 33 | - source: {{ notEmpty .source }} 34 | sourcecomponents: [] 35 | target: {{ notEmpty .target }} 36 | targetcomponents: [] 37 | id: {{ notEmpty .source }}-{{ notEmpty .target }} 38 | detectpoints: 39 | - CLIENT 40 | - SERVER 41 | {{- end }} 42 | -------------------------------------------------------------------------------- /test/e2e/expected/dependency-services-productpage.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | nodes: 17 | {{- contains .nodes }} 18 | - id: {{ b64enc "e2e::reviews"}}.1 19 | name: e2e::reviews 20 | type: http 21 | isreal: true 22 | - id: {{ b64enc "e2e::productpage"}}.1 23 | name: e2e::productpage 24 | type: http 25 | isreal: true 26 | - id: {{ b64enc "e2e::details" }}.1 27 | name: e2e::details 28 | type: http 29 | isreal: true 30 | - id: {{ b64enc "e2e::istio-ingressgateway" }}.1 31 | name: e2e::istio-ingressgateway 32 | type: http 33 | isreal: true 34 | {{- end }} 35 | calls: 36 | {{- contains .calls }} 37 | - source: {{ b64enc "e2e::istio-ingressgateway"}}.1 38 | sourcecomponents: 39 | - http 40 | target: {{ b64enc "e2e::productpage"}}.1 41 | targetcomponents: 42 | - http 43 | - mtls 44 | id: {{ b64enc "e2e::istio-ingressgateway"}}.1-{{ b64enc "e2e::productpage"}}.1 45 | detectpoints: 46 | - CLIENT 47 | - SERVER 48 | - source: {{ b64enc "e2e::productpage"}}.1 49 | sourcecomponents: 50 | - http 51 | target: {{ b64enc "e2e::details"}}.1 52 | targetcomponents: 53 | - http 54 | - mtls 55 | id: {{ b64enc "e2e::productpage"}}.1-{{ b64enc "e2e::details"}}.1 56 | detectpoints: 57 | - CLIENT 58 | - SERVER 59 | - source: {{ b64enc "e2e::productpage" }}.1 60 | sourcecomponents: 61 | - http 62 | target: {{ b64enc "e2e::reviews"}}.1 63 | targetcomponents: 64 | - http 65 | - mtls 66 | id: {{ b64enc "e2e::productpage" }}.1-{{ b64enc "e2e::reviews"}}.1 67 | detectpoints: 68 | - CLIENT 69 | - SERVER 70 | {{- end }} 71 | -------------------------------------------------------------------------------- /test/e2e/expected/dependency-services-reviews.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | nodes: 17 | {{- contains .nodes }} 18 | - id: {{ b64enc "e2e::reviews"}}.1 19 | name: e2e::reviews 20 | type: http 21 | isreal: true 22 | - id: {{ b64enc "e2e::ratings"}}.1 23 | name: e2e::ratings 24 | type: http 25 | isreal: true 26 | - id: {{ b64enc "e2e::productpage" }}.1 27 | name: e2e::productpage 28 | type: http 29 | isreal: true 30 | {{- end }} 31 | calls: 32 | {{- contains .calls }} 33 | - source: {{ b64enc "e2e::productpage"}}.1 34 | sourcecomponents: 35 | - http 36 | target: {{ b64enc "e2e::reviews"}}.1 37 | targetcomponents: 38 | - http 39 | - mtls 40 | id: {{ b64enc "e2e::productpage"}}.1-{{ b64enc "e2e::reviews"}}.1 41 | detectpoints: 42 | - CLIENT 43 | - SERVER 44 | - source: {{ b64enc "e2e::reviews" }}.1 45 | sourcecomponents: 46 | - http 47 | target: {{ b64enc "e2e::ratings"}}.1 48 | targetcomponents: 49 | - http 50 | - mtls 51 | id: {{ b64enc "e2e::reviews" }}.1-{{ b64enc "e2e::ratings"}}.1 52 | detectpoints: 53 | - CLIENT 54 | - SERVER 55 | {{- end }} 56 | -------------------------------------------------------------------------------- /test/e2e/expected/endpoint.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains .}} 17 | - id: {{ b64enc "Your_ApplicationName" }}.1_{{ b64enc "GET:/hello" }} 18 | name: 'GET:/hello' 19 | {{- end}} 20 | -------------------------------------------------------------------------------- /test/e2e/expected/hpa-metrics.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - key: {{ notEmpty .key }} 18 | value: 19 | value: 0 20 | isemptyvalue: true 21 | - key: {{ notEmpty .key }} 22 | value: 23 | value: {{ gt .value.value 15 }} 24 | isemptyvalue: false 25 | {{- end }} -------------------------------------------------------------------------------- /test/e2e/expected/metrics-has-value.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - key: {{ notEmpty .key }} 18 | value: 19 | value: 0 20 | isemptyvalue: true 21 | - key: {{ notEmpty .key }} 22 | value: 23 | value: {{ ge .value.value 1 }} 24 | isemptyvalue: false 25 | {{- end }} -------------------------------------------------------------------------------- /test/e2e/expected/metrics.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - key: {{ notEmpty .key }} 18 | value: 19 | value: {{ gt .value.value 0 }} 20 | isemptyvalue: false 21 | - key: {{ notEmpty .key }} 22 | value: 23 | value: 0 24 | isemptyvalue: true 25 | {{- end }} 26 | -------------------------------------------------------------------------------- /test/e2e/expected/replicas.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - key: "replicas" 18 | value: 3 19 | {{- end }} -------------------------------------------------------------------------------- /test/e2e/expected/service-apdex.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - key: {{ notEmpty .key }} 18 | value: 19 | value: 0 20 | isemptyvalue: true 21 | - key: {{ notEmpty .key }} 22 | value: 23 | value: {{ gt .value.value 0 }} 24 | isemptyvalue: false 25 | {{- end }} 26 | -------------------------------------------------------------------------------- /test/e2e/expected/service-endpoint-productpage.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - id: {{ b64enc "e2e::productpage" }}.1_{{ b64enc "GET:/productpage" }} 18 | name: GET:/productpage 19 | {{- end }} 20 | -------------------------------------------------------------------------------- /test/e2e/expected/service-endpoint-reviews.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - id: {{ b64enc "e2e::reviews" }}.1_{{ b64enc "GET:/reviews/0" }} 18 | name: GET:/reviews/0 19 | {{- end }} 20 | -------------------------------------------------------------------------------- /test/e2e/expected/service-instance.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - id: {{ notEmpty .id }} 18 | name: {{ notEmpty .name }} 19 | attributes: 20 | {{- contains .attributes }} 21 | - name: pod 22 | value: {{ notEmpty .value }} 23 | - name: namespace 24 | value: default 25 | - name: app 26 | value: {{ notEmpty .value }} 27 | - name: pod-template-hash 28 | value: {{ notEmpty .value }} 29 | - name: security.istio.io/tlsMode 30 | value: istio 31 | - name: service.istio.io/canonical-name 32 | value: {{ notEmpty .value }} 33 | - name: service.istio.io/canonical-revision 34 | value: {{ notEmpty .value }} 35 | - name: version 36 | value: {{ notEmpty .value }} 37 | {{- end }} 38 | language: UNKNOWN 39 | instanceuuid: {{ notEmpty .instanceuuid }} 40 | {{- end }} 41 | -------------------------------------------------------------------------------- /test/e2e/expected/service.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | {{- contains . }} 17 | - id: {{ b64enc "e2e::istio-ingressgateway" }}.1 18 | name: e2e::istio-ingressgateway 19 | group: "e2e" 20 | shortname: "istio-ingressgateway" 21 | layers: 22 | - MESH 23 | normal: true 24 | - id: {{ b64enc "e2e::reviews" }}.1 25 | name: e2e::reviews 26 | group: "e2e" 27 | shortname: "reviews" 28 | layers: 29 | - MESH 30 | normal: true 31 | - id: {{ b64enc "e2e::ratings" }}.1 32 | name: e2e::ratings 33 | group: "e2e" 34 | shortname: "ratings" 35 | layers: 36 | - MESH 37 | normal: true 38 | - id: {{ b64enc "e2e::productpage" }}.1 39 | name: e2e::productpage 40 | group: "e2e" 41 | shortname: "productpage" 42 | layers: 43 | - MESH 44 | normal: true 45 | - id: {{ b64enc "e2e::details" }}.1 46 | name: e2e::details 47 | group: "e2e" 48 | shortname: "details" 49 | layers: 50 | - MESH 51 | normal: true 52 | - id: {{ b64enc "e2e::mongodb" }}.1 53 | name: e2e::mongodb 54 | group: "e2e" 55 | shortname: "mongodb" 56 | layers: 57 | - MESH 58 | normal: true 59 | {{- end }} 60 | -------------------------------------------------------------------------------- /test/e2e/expected/swck-demo-service.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 2 | # license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright 4 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 5 | # the Apache License, Version 2.0 (the "License"); you may 6 | # not use this file except in compliance with the License. 7 | # 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, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | {{- contains . }} 19 | - id: {{ b64enc "Your_ApplicationName" }}.1 20 | name: Your_ApplicationName 21 | group: "" 22 | shortname: "Your_ApplicationName" 23 | layers: 24 | - GENERAL 25 | normal: true 26 | {{- end }} 27 | -------------------------------------------------------------------------------- /test/e2e/kind.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # this config file contains all config fields with comments 17 | # NOTE: this is not a particularly useful config file 18 | kind: Cluster 19 | apiVersion: kind.x-k8s.io/v1alpha4 20 | nodes: 21 | # the control plane node config 22 | - role: control-plane 23 | image: kindest/node:v1.21.14 24 | # the three workers 25 | - role: worker 26 | image: kindest/node:v1.21.14 27 | - role: worker 28 | image: kindest/node:v1.21.14 29 | - role: worker 30 | image: kindest/node:v1.21.14 31 | -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install-etcdctl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | BASE_DIR=$1 23 | BIN_DIR=$2 24 | 25 | if ! command -v etcdctl &> /dev/null; then 26 | mkdir -p $BASE_DIR/etcdctl && cd $BASE_DIR/etcdctl 27 | utype=$(uname | awk '{print tolower($0)}') 28 | suffix= 29 | if [ $utype = "darwin" ] 30 | then 31 | suffix="zip" 32 | else 33 | suffix="tar.gz" 34 | fi 35 | curl -kLo etcdctl.$suffix https://github.com/coreos/etcd/releases/download/v3.5.0/etcd-v3.5.0-$utype-amd64.$suffix 36 | tar -zxf etcdctl.$suffix --strip=1 37 | cp etcdctl $BIN_DIR/ 38 | fi -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install-helm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | BASE_DIR=$1 23 | BIN_DIR=$2 24 | HELMVERSION=${HELMVERSION:-'helm-v3.0.0'} 25 | 26 | if ! command -v helm &> /dev/null; then 27 | mkdir -p $BASE_DIR/helm && cd $BASE_DIR/helm 28 | curl -sSL https://get.helm.sh/${HELMVERSION}-linux-amd64.tar.gz 29 | tar xz -C $BIN_DIR --strip-components=1 linux-amd64/helm 30 | fi -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install-istioctl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | BASE_DIR=$1 23 | BIN_DIR=$2 24 | 25 | if ! command -v istioctl &> /dev/null; then 26 | mkdir -p $BASE_DIR/istioctl && cd $BASE_DIR/istioctl 27 | curl -L https://istio.io/downloadIstio | sh - 28 | cp istio-$ISTIO_VERSION/bin/istioctl $BIN_DIR/istioctl 29 | fi -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install-kubectl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | BASE_DIR=$1 23 | BIN_DIR=$2 24 | K8SVERSION=${K8SVERSION:-'k8s-v1.19.2'} 25 | 26 | if ! command -v kubectl &> /dev/null; then 27 | curl -sSL "https://storage.googleapis.com/kubernetes-release/release/${K8SVERSION#k8s-}/bin/linux/amd64/kubectl" -o $BIN_DIR/kubectl 28 | chmod +x $BIN_DIR/kubectl 29 | fi -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install-swctl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | BASE_DIR=$1 23 | BIN_DIR=$2 24 | 25 | install_swctl() { 26 | mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl 27 | curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz 28 | tar -zxf skywalking-cli.tar.gz --strip=1 29 | VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR 30 | } 31 | 32 | if ! command -v swctl &> /dev/null; then 33 | echo "swctl is not installed" 34 | install_swctl 35 | elif ! swctl --version | grep -q "${SW_CTL_COMMIT}"; then 36 | # Check if the installed version is correct 37 | echo "swctl is already installed, but version is not ${SW_CTL_COMMIT}, will re-install it" 38 | install_swctl 39 | fi 40 | -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install-yq.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | BASE_DIR=$1 23 | BIN_DIR=$2 24 | 25 | if ! command -v yq &> /dev/null; then 26 | mkdir -p $BASE_DIR/yq && cd $BASE_DIR/yq 27 | curl -kLo yq.tar.gz https://github.com/mikefarah/yq/archive/v4.33.3.tar.gz 28 | tar -zxf yq.tar.gz --strip=1 29 | go install && go build -ldflags -s && cp yq $BIN_DIR/ 30 | fi -------------------------------------------------------------------------------- /test/e2e/setup-e2e-shell/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------- 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # ---------------------------------------------------------------------------- 21 | 22 | set -ex 23 | 24 | NAME=$1 25 | CURRENT_DIR="$(cd "$(dirname $0)"; pwd)" 26 | 27 | # prepare base dir 28 | TMP_DIR=/tmp/skywalking-infra-e2e 29 | BIN_DIR=/usr/local/bin 30 | mkdir -p $TMP_DIR && cd $TMP_DIR 31 | 32 | # execute install 33 | bash $CURRENT_DIR/install-$NAME.sh $TMP_DIR $BIN_DIR 34 | 35 | echo "success to install $NAME" 36 | -------------------------------------------------------------------------------- /test/e2e/swck/oap-agent-adapter-hpa.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | setup: 17 | env: kind 18 | file: ../kind.yaml 19 | init-system-environment: ../env 20 | kind: 21 | expose-ports: 22 | - namespace: skywalking-system 23 | resource: service/demo 24 | port: 8085 25 | - namespace: skywalking-system 26 | resource: service/skywalking-system-oap 27 | port: 12800 28 | steps: 29 | - name: Install yq 30 | command: bash test/e2e/setup-e2e-shell/install.sh yq 31 | - name: Install swctl 32 | command: bash test/e2e/setup-e2e-shell/install.sh swctl 33 | - name: Install kubectl 34 | command: bash test/e2e/setup-e2e-shell/install.sh kubectl 35 | - name: Install helm 36 | command: bash test/e2e/setup-e2e-shell/install.sh helm 37 | - name: Install cert-manager 38 | command: | 39 | kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml 40 | wait: 41 | - namespace: cert-manager 42 | resource: pod 43 | for: condition=Ready 44 | - name: Install adapter 45 | command: | 46 | helm install adapter chart/adapter --namespace=skywalking-custom-metrics-system \ 47 | --create-namespace \ 48 | --set fullnameOverride=skywalking-swck \ 49 | --set oap.service.name=skywalking-system-oap \ 50 | --set oap.service.namespace=skywalking-system \ 51 | --set oap.service.port=12800 52 | wait: 53 | - namespace: skywalking-custom-metrics-system 54 | resource: deployment/skywalking-swck-adapter 55 | for: condition=Available 56 | - name: Install operator 57 | command: | 58 | helm dep up chart/operator 59 | helm install operator chart/operator --namespace=skywalking-swck-system \ 60 | --create-namespace \ 61 | --set fullnameOverride=skywalking-swck 62 | wait: 63 | - namespace: skywalking-swck-system 64 | resource: deployment/skywalking-swck-operator 65 | for: condition=Available 66 | - name: Setup oapserver and ui 67 | command: | 68 | kubectl create namespace skywalking-system 69 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/skywalking-components.yaml | grep -B20 "\-\-\-" | kubectl apply -f - 70 | wait: 71 | - namespace: skywalking-system 72 | resource: OAPServer/skywalking-system 73 | for: condition=Available 74 | - name: Setup java agent demo 75 | command: | 76 | kubectl label namespace skywalking-system swck-injection=enabled 77 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/demo.yaml | sed 's/oap-service/skywalking-system-oap.skywalking-system/' | kubectl apply -f - 78 | wait: 79 | - namespace: skywalking-system 80 | resource: deployment/demo 81 | for: condition=Available 82 | - name: Setup the hpa of java agent demo 83 | command: | 84 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/hpa-demo.yaml | kubectl apply -f - 85 | timeout: 20m 86 | 87 | cleanup: 88 | # always never success failure 89 | on: always 90 | 91 | trigger: 92 | action: http 93 | interval: 30s 94 | times: 30 95 | url: http://${service_demo_host}:${service_demo_8085}/hello 96 | method: GET 97 | 98 | verify: 99 | # verify with retry strategy 100 | retry: 101 | # max retry count 102 | count: 30 103 | # the interval between two attempts, e.g. 10s, 1m. 104 | interval: 10s 105 | cases: 106 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' - 107 | expected: ../expected/hpa-metrics.yaml 108 | # the trigger will do 30 times, as the hpa's value is set as 5, so the deployment's replicas will be 3(maxReplicas). 109 | - query: 'kubectl get deployment demo -n skywalking-system -o jsonpath=''{.status.replicas}'' | yq e ''{"replicas": .}'' - | yq e ''to_entries'' -' 110 | expected: ../expected/replicas.yaml 111 | -------------------------------------------------------------------------------- /test/e2e/swck/oap-agent-banyandb.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | setup: 17 | env: kind 18 | file: ../kind.yaml 19 | init-system-environment: ../env 20 | kind: 21 | expose-ports: 22 | - namespace: skywalking-system 23 | resource: service/demo 24 | port: 8085 25 | - namespace: default 26 | resource: service/default-oap 27 | port: 12800 28 | - namespace: default 29 | resource: service/banyandb-test-banyandb-grpc 30 | port: 17912 31 | steps: 32 | - name: Install yq 33 | command: bash test/e2e/setup-e2e-shell/install.sh yq 34 | - name: Install swctl 35 | command: bash test/e2e/setup-e2e-shell/install.sh swctl 36 | - name: Install kubectl 37 | command: bash test/e2e/setup-e2e-shell/install.sh kubectl 38 | - name: Install helm 39 | command: bash test/e2e/setup-e2e-shell/install.sh helm 40 | - name: Install cert-manager 41 | command: | 42 | kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml 43 | wait: 44 | - namespace: cert-manager 45 | resource: pod 46 | for: condition=Ready 47 | - name: Install operator 48 | command: | 49 | helm dep up chart/operator 50 | helm install operator chart/operator --namespace=skywalking-swck-system \ 51 | --create-namespace \ 52 | --set fullnameOverride=skywalking-swck 53 | wait: 54 | - namespace: skywalking-swck-system 55 | resource: deployment/skywalking-swck-operator 56 | for: condition=Available 57 | - name: label control plane for banyandb affinity test 58 | command: | 59 | kubectl label nodes kind-control-plane storage=banyandb 60 | - name: remove taint on control plane and enable schedule 61 | command: | 62 | kubectl taint nodes kind-control-plane node-role.kubernetes.io/master- 63 | - name: Install banyandb 64 | command: | 65 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/deploy-banyandb.yaml | kubectl apply -f - 66 | - name: setup oapserver and ui 67 | command: | 68 | kubectl create namespace skywalking-system 69 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/skywalking-components-with-banyandb.yaml | kubectl apply -f - 70 | wait: 71 | - namespace: default 72 | resource: OAPServer/default 73 | for: condition=Available 74 | - namespace: skywalking-system 75 | resource: UI/skywalking-system 76 | for: condition=Available 77 | - name: Setup java agent demo 78 | command: | 79 | kubectl label namespace skywalking-system swck-injection=enabled 80 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/demo.yaml | sed 's/oap-service/default-oap.default/' | kubectl apply -f - 81 | wait: 82 | - namespace: skywalking-system 83 | resource: deployment/demo 84 | for: condition=Available 85 | timeout: 20m 86 | 87 | cleanup: 88 | # always never success failure 89 | on: always 90 | 91 | trigger: 92 | action: http 93 | interval: 10s 94 | times: 5 95 | url: http://${service_demo_host}:${service_demo_8085}/hello 96 | method: GET 97 | 98 | verify: 99 | # verify with retry strategy 100 | retry: 101 | # max retry count 102 | count: 30 103 | # the interval between two attempts, e.g. 10s, 1m. 104 | interval: 10s 105 | cases: 106 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql service ls 107 | expected: ../expected/swck-demo-service.yaml 108 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' - 109 | expected: ../expected/metrics.yaml 110 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName 111 | expected: ../expected/endpoint.yaml 112 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' - 113 | expected: ../expected/metrics.yaml 114 | -------------------------------------------------------------------------------- /test/e2e/swck/oap-ui-agent-elasticsearch.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | setup: 17 | env: kind 18 | file: ../kind.yaml 19 | init-system-environment: ../env 20 | kind: 21 | expose-ports: 22 | - namespace: skywalking-system 23 | resource: service/demo 24 | port: 8085 25 | - namespace: default 26 | resource: service/default-oap 27 | port: 12800 28 | - namespace: default 29 | resource: service/es-out 30 | port: 9200 31 | steps: 32 | - name: Install yq 33 | command: bash test/e2e/setup-e2e-shell/install.sh yq 34 | - name: Install swctl 35 | command: bash test/e2e/setup-e2e-shell/install.sh swctl 36 | - name: Install kubectl 37 | command: bash test/e2e/setup-e2e-shell/install.sh kubectl 38 | - name: Install helm 39 | command: bash test/e2e/setup-e2e-shell/install.sh helm 40 | - name: Install cert-manager 41 | command: | 42 | kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml 43 | wait: 44 | - namespace: cert-manager 45 | resource: pod 46 | for: condition=Ready 47 | - name: Install operator 48 | command: | 49 | helm dep up chart/operator 50 | helm install operator chart/operator --namespace=skywalking-swck-system \ 51 | --create-namespace \ 52 | --set fullnameOverride=skywalking-swck 53 | wait: 54 | - namespace: skywalking-swck-system 55 | resource: deployment/skywalking-swck-operator 56 | for: condition=Available 57 | - name: setup elasticsearch 58 | command: | 59 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/deploy-elasticsearch.yaml | kubectl apply -f - 60 | kubectl rollout status --watch --timeout=120s statefulset/es 61 | - name: setup storage(use the external type) 62 | command: | 63 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/external-storage.yaml | kubectl apply -f - 64 | - name: setup oapserver and ui 65 | command: | 66 | kubectl create namespace skywalking-system 67 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/skywalking-components-with-storage.yaml | kubectl apply -f - 68 | wait: 69 | - namespace: default 70 | resource: OAPServer/default 71 | for: condition=Available 72 | - namespace: skywalking-system 73 | resource: UI/skywalking-system 74 | for: condition=Available 75 | - name: Setup java agent demo 76 | command: | 77 | kubectl label namespace skywalking-system swck-injection=enabled 78 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/demo.yaml | sed 's/oap-service/default-oap.default/' | kubectl apply -f - 79 | wait: 80 | - namespace: skywalking-system 81 | resource: deployment/demo 82 | for: condition=Available 83 | timeout: 20m 84 | 85 | cleanup: 86 | # always never success failure 87 | on: always 88 | 89 | trigger: 90 | action: http 91 | interval: 10s 92 | times: 5 93 | url: http://${service_demo_host}:${service_demo_8085}/hello 94 | method: GET 95 | 96 | verify: 97 | # verify with retry strategy 98 | retry: 99 | # max retry count 100 | count: 30 101 | # the interval between two attempts, e.g. 10s, 1m. 102 | interval: 10s 103 | cases: 104 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql service ls 105 | expected: ../expected/swck-demo-service.yaml 106 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' - 107 | expected: ../expected/metrics.yaml 108 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName 109 | expected: ../expected/endpoint.yaml 110 | - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' - 111 | expected: ../expected/metrics.yaml 112 | -------------------------------------------------------------------------------- /test/e2e/swck/oap-ui-agent-oapserverconfig.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | setup: 17 | env: kind 18 | file: ../kind.yaml 19 | init-system-environment: ../env 20 | kind: 21 | expose-ports: 22 | - namespace: skywalking-system 23 | resource: service/demo 24 | port: 8085 25 | - namespace: skywalking-system 26 | resource: service/skywalking-system-oap 27 | port: 12800 28 | - namespace: skywalking-system 29 | resource: service/songs 30 | port: 80 31 | steps: 32 | - name: Install yq 33 | command: bash test/e2e/setup-e2e-shell/install.sh yq 34 | - name: Install swctl 35 | command: bash test/e2e/setup-e2e-shell/install.sh swctl 36 | - name: Install kubectl 37 | command: bash test/e2e/setup-e2e-shell/install.sh kubectl 38 | - name: Install helm 39 | command: bash test/e2e/setup-e2e-shell/install.sh helm 40 | - name: Install cert-manager 41 | command: | 42 | kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml 43 | wait: 44 | - namespace: cert-manager 45 | resource: pod 46 | for: condition=Ready 47 | - name: Install operator 48 | command: | 49 | helm dep up chart/operator 50 | helm install operator chart/operator --namespace=skywalking-swck-system \ 51 | --create-namespace \ 52 | --set fullnameOverride=skywalking-swck 53 | wait: 54 | - namespace: skywalking-swck-system 55 | resource: deployment/skywalking-swck-operator 56 | for: condition=Available 57 | - name: setup oapserver and ui 58 | command: | 59 | kubectl create namespace skywalking-system 60 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/skywalking-components.yaml | kubectl apply -f - 61 | wait: 62 | - namespace: skywalking-system 63 | resource: OAPServer/skywalking-system 64 | for: condition=Available 65 | - namespace: skywalking-system 66 | resource: UI/skywalking-system 67 | for: condition=Available 68 | - name: setup java agent demo(test for dynamic configuration) 69 | command: | 70 | kubectl label namespace skywalking-system swck-injection=enabled 71 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/demo.yaml | sed 's/oap-service/skywalking-system-oap.skywalking-system/' | kubectl create -f - 72 | wait: 73 | - namespace: skywalking-system 74 | resource: deployment/demo 75 | for: condition=Available 76 | - name: setup oapserverconfig(static configuration) 77 | command: | 78 | export oap_podname=$(kubectl get pod -lapp=oap -n skywalking-system -o jsonpath='{.items[*].metadata.name}') 79 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/oapserverconfig-demo.yaml | kubectl apply -f - 80 | - name: wait the old pod teminated 81 | command: | 82 | while kubectl get pod $oap_podname -n skywalking-system > /dev/null; \ 83 | do \ 84 | sleep 0.1; \ 85 | done 86 | - name: setup java agent demo(test for static configuration) 87 | command: | 88 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/resource.yaml | sed 's/oap-service/skywalking-system-oap.skywalking-system/' | kubectl create -f - 89 | wait: 90 | - namespace: skywalking-system 91 | resource: deployment/songs-deployment 92 | for: condition=Available 93 | - name: setup oapserverdynamicconfig(dynamic configuration) 94 | command: | 95 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/oapserverdynamicconfig-demo.yaml | sed 's/default: 0.1/default: 500/' | kubectl apply -f - 96 | timeout: 20m 97 | 98 | cleanup: 99 | # always never success failure 100 | on: always 101 | 102 | trigger: 103 | action: http 104 | interval: 5s 105 | times: 5 106 | url: http://${service_demo_host}:${service_demo_8085}/hello 107 | method: GET 108 | 109 | verify: 110 | # verify with retry strategy 111 | retry: 112 | # max retry count 113 | count: 30 114 | # the interval between two attempts, e.g. 10s, 1m. 115 | interval: 10s 116 | cases: 117 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql service ls 118 | expected: ../expected/swck-demo-service.yaml 119 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' - 120 | expected: ../expected/metrics.yaml 121 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName 122 | expected: ../expected/endpoint.yaml 123 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' - 124 | expected: ../expected/metrics.yaml 125 | # test oapsever's static configuration 126 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name=log_count_info --instance-name=songs --service-name=agent::songs | yq e 'to_entries' - 127 | expected: ../expected/metrics.yaml 128 | # test oapsever's dynamic configuration 129 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name=service_apdex --service-name=Your_ApplicationName | yq e 'to_entries' - 130 | expected: ../expected/service-apdex.yaml 131 | -------------------------------------------------------------------------------- /test/e2e/swck/oap-ui-agent-satellite.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | setup: 17 | env: kind 18 | file: ../kind.yaml 19 | init-system-environment: ../env 20 | kind: 21 | expose-ports: 22 | - namespace: skywalking-system 23 | resource: service/demo 24 | port: 8085 25 | - namespace: skywalking-system 26 | resource: service/skywalking-system-oap 27 | port: 12800 28 | steps: 29 | - name: Install yq 30 | command: bash test/e2e/setup-e2e-shell/install.sh yq 31 | - name: Install swctl 32 | command: bash test/e2e/setup-e2e-shell/install.sh swctl 33 | - name: Install kubectl 34 | command: bash test/e2e/setup-e2e-shell/install.sh kubectl 35 | - name: Install helm 36 | command: bash test/e2e/setup-e2e-shell/install.sh helm 37 | - name: Install cert-manager 38 | command: | 39 | kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml 40 | wait: 41 | - namespace: cert-manager 42 | resource: pod 43 | for: condition=Ready 44 | - name: Install operator 45 | command: | 46 | helm dep up chart/operator 47 | helm install operator chart/operator --namespace=skywalking-swck-system \ 48 | --create-namespace \ 49 | --set fullnameOverride=skywalking-swck 50 | wait: 51 | - namespace: skywalking-swck-system 52 | resource: deployment/skywalking-swck-operator 53 | for: condition=Available 54 | - name: setup oapserver and ui 55 | command: | 56 | kubectl create namespace skywalking-system 57 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/skywalking-components-with-satellite.yaml | kubectl apply -f - 58 | wait: 59 | - namespace: skywalking-system 60 | resource: OAPServer/skywalking-system 61 | for: condition=Available 62 | - namespace: skywalking-system 63 | resource: UI/skywalking-system 64 | for: condition=Available 65 | - namespace: skywalking-system 66 | resource: Satellite/skywalking-system 67 | for: condition=Available 68 | - name: Setup java agent demo 69 | command: | 70 | kubectl label namespace skywalking-system swck-injection=enabled 71 | curl https://raw.githubusercontent.com/apache/skywalking-swck/v0.9.0/test/e2e/demo.yaml | sed 's/oap-service/skywalking-system-satellite.skywalking-system/' | kubectl apply -f - 72 | wait: 73 | - namespace: skywalking-system 74 | resource: deployment/demo 75 | for: condition=Available 76 | timeout: 20m 77 | 78 | cleanup: 79 | # always never success failure 80 | on: always 81 | 82 | trigger: 83 | action: http 84 | interval: 30s 85 | times: 30 86 | url: http://${service_demo_host}:${service_demo_8085}/hello 87 | method: GET 88 | 89 | verify: 90 | # verify with retry strategy 91 | retry: 92 | # max retry count 93 | count: 30 94 | # the interval between two attempts, e.g. 10s, 1m. 95 | interval: 10s 96 | cases: 97 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql service ls 98 | expected: ../expected/swck-demo-service.yaml 99 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' - 100 | expected: ../expected/metrics.yaml 101 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName 102 | expected: ../expected/endpoint.yaml 103 | - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' - 104 | expected: ../expected/metrics.yaml 105 | -------------------------------------------------------------------------------- /test/e2e/traffic-gen.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: trafficgenerator 20 | labels: 21 | app: trafficgenerator 22 | spec: 23 | replicas: 1 24 | selector: 25 | matchLabels: 26 | app: trafficgenerator 27 | template: 28 | metadata: 29 | annotations: 30 | sidecar.istio.io/inject: "false" 31 | labels: 32 | app: trafficgenerator 33 | spec: 34 | containers: 35 | - name: trafficgenerator 36 | image: williamyeh/wrk 37 | command: ["wrk", "-t1", "-c1", "-d20m", "http://istio-ingressgateway.istio-system:80/productpage"] 38 | resources: 39 | requests: 40 | cpu: 0.1 -------------------------------------------------------------------------------- /test/e2e/values.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | oap: 17 | config: 18 | metadata-service-mapping.yaml: | 19 | serviceName: e2e::${LABELS."service.istio.io/canonical-name"} 20 | serviceInstanceName: ${NAME} 21 | elasticsearch: 22 | esConfig: 23 | elasticsearch.yml: | 24 | cluster.routing.allocation.disk.watermark.low: 90% 25 | cluster.routing.allocation.disk.watermark.high: 99% 26 | cluster.routing.allocation.disk.watermark.flood_stage: 99% 27 | --------------------------------------------------------------------------------