|
1 |
| -# Service Mesh Patterns for mesheryctl GitHub Action |
| 1 | +# Meshery - Service Mesh Patterns GitHub Action |
2 | 2 |
|
3 |
| -Incorporate Service Mesh Patterns into your GitHub workflows using Meshery's CLI |
| 3 | +GitHub Action to deploy [Service Mesh Patterns](https://layer5.io/learn/service-mesh-books/service-mesh-patterns) on CI/CD pipelines. |
4 | 4 |
|
5 |
| -<div> </div> |
| 5 | +## Learn More |
| 6 | + |
| 7 | +- [Functionality: Service Mesh Patterns](https://docs.meshery.io/functionality/pattern-management) |
| 8 | +- [Configuring your Deployment with Patterns, Filters and Applications](https://docs.meshery.io/guides/configuration-management#configuring-your-deployment-with-patterns-filters-and-applicatio) |
| 9 | + |
| 10 | +## Supported Service Meshes |
| 11 | + |
| 12 | +Meshery supports 10 different service meshes. |
| 13 | + |
| 14 | +<details> |
| 15 | + <summary><strong>See all Supported Service Meshes</strong></summary> |
| 16 | +<div class="container flex"> |
| 17 | + <div class="text editable"> |
| 18 | + <p>Service mesh adapters provision, configure, and manage their respective service meshes. |
| 19 | + <table class="adapters"> |
| 20 | + <thead style="display:none;"> |
| 21 | + <th>Status</th> |
| 22 | + <th>Adapter</th> |
| 23 | + </thead> |
| 24 | + <tbody> |
| 25 | + <tr> |
| 26 | + <td rowspan="9" class="stable-adapters">stable</td> |
| 27 | + </tr> |
| 28 | + <tr> |
| 29 | + <td><a href="https://github.com/layer5io/meshery-istio"> |
| 30 | + <img src='https://docs.meshery.io/assets/img/service-meshes/istio.svg' alt='Meshery Adapter for Istio Service Mesh' align="middle" hspace="10px" vspace="5px" height="30px" > Meshery adapter for Istio</a> |
| 31 | + </td> |
| 32 | + </tr> |
| 33 | + <tr> |
| 34 | + <td><a href="https://github.com/layer5io/meshery-linkerd"> |
| 35 | + <img src='https://docs.meshery.io/assets/img/service-meshes/linkerd.svg' alt='Linkerd' align="middle" hspace="5px" vspace="5px" height="30px" width="30px"> Meshery adapter for Linkerd</a> |
| 36 | + </td> |
| 37 | + </tr> |
| 38 | + <tr> |
| 39 | + <td><a href="https://github.com/layer5io/meshery-consul"> |
| 40 | + <img src='https://docs.meshery.io/assets/img/service-meshes/consul.svg' alt='Consul Connect' align="middle" hspace="5px" vspace="5px" height="30px" width="30px"> Meshery adapter for Consul</a> |
| 41 | + </td> |
| 42 | + </tr> |
| 43 | + <tr> |
| 44 | + <td><a href="https://github.com/layer5io/meshery-octarine"> |
| 45 | + <img src='https://docs.meshery.io/assets/img/service-meshes/octarine.svg' alt='Octarine Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Octarine</a> |
| 46 | + </td> |
| 47 | + </tr> |
| 48 | + <tr> |
| 49 | + <td><a href="https://github.com/layer5io/meshery-nsm"> |
| 50 | + <img src='https://docs.meshery.io/assets/img/service-meshes/nsm.svg' alt='Network Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Network Service Mesh</a> |
| 51 | + </td> |
| 52 | + </tr> |
| 53 | + <tr> |
| 54 | + <td><a href="https://github.com/layer5io/meshery-kuma"> |
| 55 | + <img src='https://docs.meshery.io/assets/img/service-meshes/kuma.svg' alt='Kuma Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Kuma</a> |
| 56 | + </td> |
| 57 | + </tr> |
| 58 | + <tr> |
| 59 | + <td><a href="https://github.com/layer5io/meshery-osm"> |
| 60 | + <img src='https://docs.meshery.io/assets/img/service-meshes/osm.svg' alt='Open Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Open Service Mesh</a> |
| 61 | + </td> |
| 62 | + </tr> |
| 63 | + <tr><td colspan="2" class="stable-adapters"></td></tr> |
| 64 | + <tr> |
| 65 | + <td rowspan="5" class="beta-adapters">beta</td> |
| 66 | + </tr> |
| 67 | + <tr> |
| 68 | + <td><a href="https://github.com/layer5io/meshery-cpx"> |
| 69 | + <img src='https://docs.meshery.io/assets/img/service-meshes/citrix.svg' alt='Citrix CPX Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Citrix CPX</a> |
| 70 | + </td> |
| 71 | + </tr> |
| 72 | + <tr> |
| 73 | + <td><a href="https://github.com/layer5io/meshery-traefik-mesh"> |
| 74 | + <img src='https://docs.meshery.io/assets/img/service-meshes/traefik-mesh.svg' alt='Traefik Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Traefik Mesh</a> |
| 75 | + </td> |
| 76 | + </tr> |
| 77 | + <tr> |
| 78 | + <td><a href="https://github.com/meshery/meshery-nginx-sm"> |
| 79 | + <img src='https://docs.meshery.io/assets/img/service-meshes/nginx-sm.svg' alt='NGINX Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for NGINX Service Mesh</a> |
| 80 | + </td> |
| 81 | + </tr> |
| 82 | + <tr><td colspan="2" class="beta-adapters"></td></tr> |
| 83 | + <tr> |
| 84 | + <td rowspan="3" class="alpha-adapters">alpha</td> |
| 85 | + </tr> |
| 86 | + <tr> |
| 87 | + <td><a href="https://github.com/meshery/meshery-tanzu-sm"> |
| 88 | + <img src='https://docs.meshery.io/assets/img/service-meshes/tanzu.svg' alt='Tanzu Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for Tanzu SM</a> |
| 89 | + </td> |
| 90 | + </tr> |
| 91 | + <tr> |
| 92 | + <td><a href="https://github.com/meshery/meshery-app-mesh"> |
| 93 | + <img src='https://docs.meshery.io/assets/img/service-meshes/app-mesh.svg' alt='AWS App Mesh Service Mesh' align="middle" hspace="5px" vspace="5px" height="30px" width="30px">Meshery adapter for App Mesh</a> |
| 94 | + </td> |
| 95 | + </tr> |
| 96 | + <tr><td colspan="2" class="alpha-adapters"></td></tr> |
| 97 | + </tbody> |
| 98 | + </table> |
| 99 | + </p> |
| 100 | +</div> |
| 101 | + </details> |
| 102 | + |
| 103 | +## Usage |
| 104 | + |
| 105 | +See [action.yml](action.yml) |
| 106 | + |
| 107 | +Users can define pattern files and store it in a remote location and pass the URL to the action or directly keep the file in the `.github` folder and reference it by file name. |
6 | 108 |
|
7 |
| -## Sample pattern action configuration |
| 109 | +### Sample Configurations |
| 110 | + |
| 111 | +#### Deploying a pattern with URL |
8 | 112 |
|
9 | 113 | ```yaml
|
10 |
| -name: Mesheryctl Pattern Action |
| 114 | +name: Apply Service Mesh Pattern with Meshery |
11 | 115 | on:
|
12 |
| - push: |
13 |
| - branches: |
14 |
| - - 'master' |
15 |
| - # if manually triggering, provide a provider token yourself |
16 | 116 | workflow_dispatch:
|
17 | 117 | inputs:
|
18 | 118 | provider_token:
|
19 |
| - description: "Meshery auth token" |
20 |
| - required: true |
| 119 | + description: "Provider token to use" |
| 120 | + required: false |
| 121 | + platform: |
| 122 | + description: "Platform to deploy Meshery to" |
| 123 | + required: false |
| 124 | + pattern_url: |
| 125 | + description: "URL of the pattern to be deployed" |
| 126 | + required: false |
| 127 | + pattern_file: |
| 128 | + description: "Name of the pattern file relative to the .github folder" |
| 129 | + required: false |
21 | 130 |
|
22 | 131 | jobs:
|
23 |
| - mesheryctl-pattern-action: |
24 |
| - name: Mesheryctl Pattern Actions |
| 132 | + apply-pattern-file: |
| 133 | + name: Meshery Pattern Apply |
25 | 134 | runs-on: ubuntu-latest
|
26 | 135 | steps:
|
27 |
| - - name: mesheryctl pattern action |
| 136 | + - name: Setup Kubernetes |
| 137 | + |
| 138 | + with: |
| 139 | + minikube version: 'v1.23.2' |
| 140 | + kubernetes version: 'v1.22.2' |
| 141 | + driver: docker |
| 142 | + |
| 143 | + - name: Apply Pattern |
28 | 144 | uses: layer5io/mesheryctl-service-mesh-patterns-action@master
|
29 | 145 | with:
|
30 | 146 | provider_token: ${{ github.event.inputs.provider_token }}
|
31 |
| - platform: docker |
32 |
| - url: https://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/IstioFilterPattern.yaml |
| 147 | + platform: ${{ github.event.inputs.platform }} |
| 148 | + pattern_url: ${{ github.event.inputs.pattern_url }} |
| 149 | +``` |
| 150 | +
|
| 151 | +### Sample Pattern File |
| 152 | +
|
| 153 | +```yaml |
| 154 | +name: ImageHubRateLimit |
| 155 | +version: 0.0.1 |
| 156 | +services: |
| 157 | + generic-istio-filter: |
| 158 | + type: EnvoyFilterIstio |
| 159 | + namespace: istio-test |
| 160 | + settings: |
| 161 | + configPatches: |
| 162 | + - applyTo: HTTP_FILTER |
| 163 | + match: |
| 164 | + context: SIDECAR_INBOUND |
| 165 | + proxy: |
| 166 | + proxyVersion: '^1\.9.*' |
| 167 | + listener: |
| 168 | + portNumber: 9091 |
| 169 | + filterChain: |
| 170 | + filter: |
| 171 | + name: envoy.http_connection_manager |
| 172 | + subFilter: |
| 173 | + name: envoy.router |
| 174 | + patch: |
| 175 | + operation: INSERT_BEFORE |
| 176 | + value: |
| 177 | + name: envoy.filter.http.wasm |
| 178 | + config_discovery: |
| 179 | + config_source: |
| 180 | + ads: {} |
| 181 | + initial_fetch_timeout: 0s |
| 182 | + type_urls: ["type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm"] |
| 183 | + workloadSelector: |
| 184 | + labels: |
| 185 | + app: api |
| 186 | + version: v1 |
| 187 | + |
| 188 | + ratelimit-filter: |
| 189 | + type: EnvoyFilterIstio |
| 190 | + namespace: istio-test |
| 191 | + settings: |
| 192 | + configPatches: |
| 193 | + - applyTo: EXTENSION_CONFIG |
| 194 | + match: |
| 195 | + context: SIDECAR_INBOUND |
| 196 | + patch: |
| 197 | + operation: ADD |
| 198 | + value: |
| 199 | + name: envoy.filter.http.wasm |
| 200 | + typed_config: |
| 201 | + "@type": type.googleapis.com/udpa.type.v1.TypedStruct |
| 202 | + type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm |
| 203 | + value: |
| 204 | + config: |
| 205 | + configuration: |
| 206 | + "@type": type.googleapis.com/google.protobuf.StringValue |
| 207 | + value: "rate_limit_filter" |
| 208 | + root_id: "rate_limit_filter" |
| 209 | + vm_config: |
| 210 | + code: |
| 211 | + remote: |
| 212 | + http_uri: |
| 213 | + uri: https://github.com/layer5io/image-hub/raw/master/rate-limit-filter/pkg/rate_limit_filter_bg.wasm |
| 214 | + |
| 215 | + runtime: envoy.wasm.runtime.v8 |
| 216 | + vm_id: rate_limit_filter |
| 217 | + configuration: |
| 218 | + "@type": type.googleapis.com/google.protobuf.StringValue |
| 219 | + value: "WwogIHsKICAgICJuYW1lIjogIi9wdWxsIiwKICAgICJydWxlIjp7CiAgICAgICJydWxlVHlwZSI6ICJyYXRlLWxpbWl0ZXIiLAogICAgICAicGFyYW1ldGVycyI6WwogICAgICAgIHsiaWRlbnRpZmllciI6ICJFbnRlcnByaXNlIiwgImxpbWl0IjogMTAwMH0sCiAgICAgICAgeyJpZGVudGlmaWVyIjogIlRlYW0iLCAibGltaXQiOiAxMDB9LAogICAgICAgIHsiaWRlbnRpZmllciI6ICJQZXJzb25hbCIsICJsaW1pdCI6IDEwfQogICAgICBdCiAgICB9CiAgfSwKICB7CiAgICAibmFtZSI6ICIvYXV0aCIsCiAgICAicnVsZSI6ewogICAgICAicnVsZVR5cGUiOiAibm9uZSIKICAgIH0KICB9LAogIHsKICAgICJuYW1lIjogIi9zaWdudXAiLAogICAgInJ1bGUiOnsKICAgICAgInJ1bGVUeXBlIjogIm5vbmUiCiAgICB9CiAgfSwKICB7CiAgICAibmFtZSI6ICIvdXBncmFkZSIsCiAgICAicnVsZSI6ewogICAgICAicnVsZVR5cGUiOiAibm9uZSIKICAgIH0KICB9Cl0=" |
| 220 | + allow_precompiled: true |
| 221 | + workloadSelector: |
| 222 | + labels: |
| 223 | + app: api |
| 224 | + version: v1 |
| 225 | + dependsOn: |
| 226 | + - generic-istio-filter |
33 | 227 | ```
|
34 | 228 |
|
35 | 229 | ## Join the service mesh community!
|
|
0 commit comments