Giter Site home page Giter Site logo

kiptoonkipkurui / meshery-service-mesh-patterns-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from layer5io/meshery-cloud-native-patterns-action

0.0 0.0 0.0 187 KB

GitHub Action to apply Service Mes Patterns in CI/CD pipelines

License: Apache License 2.0

Shell 83.98% JavaScript 4.50% Makefile 11.52%

meshery-service-mesh-patterns-action's Introduction

Meshery - Service Mesh Patterns GitHub Action

GitHub Action to deploy Service Mesh Patterns on CI/CD pipelines.

Learn More

Supported Service Meshes

Meshery supports 10 different service meshes.

See all Supported Service Meshes

Usage

See action.yml

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.

Sample Configurations

Deploying a pattern with URL

name: Apply Service Mesh Pattern with Meshery
on:
  workflow_dispatch:
    inputs:
      provider_token:
        description: "Provider token to use"
        required: false
      platform:
        description: "Platform to deploy Meshery to"
        required: false
      pattern_url:
        description: "URL of the pattern to be deployed"
        required: false
      pattern_file:
        description: "Name of the pattern file relative to the .github folder"
        required: false

jobs:
  apply-pattern-file:
    name: Meshery Pattern Apply 
    runs-on: ubuntu-latest
    steps:
      - name: Setup Kubernetes
        uses: manusa/[email protected]
        with:
          minikube version: 'v1.23.2'
          kubernetes version: 'v1.22.2'
          driver: docker

      - name: Apply Pattern
        uses: layer5io/mesheryctl-service-mesh-patterns-action@master
        with:
          provider_token: ${{ github.event.inputs.provider_token }}
          platform: ${{ github.event.inputs.platform }}
          pattern_url: ${{ github.event.inputs.pattern_url }}

Sample Pattern File

name: ImageHubRateLimit
version: 0.0.1
services:
  generic-istio-filter:
    type: EnvoyFilterIstio
    namespace: istio-test
    settings:
      configPatches:
        - applyTo: HTTP_FILTER
          match:
            context: SIDECAR_INBOUND
            proxy:
              proxyVersion: '^1\.9.*'
            listener:
              portNumber: 9091
              filterChain:
                filter:
                  name: envoy.http_connection_manager
                  subFilter:
                    name: envoy.router
          patch:
            operation: INSERT_BEFORE
            value:
              name: envoy.filter.http.wasm
              config_discovery:
                config_source:
                  ads: {}
                  initial_fetch_timeout: 0s
                type_urls: ["type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm"]
      workloadSelector:
        labels:
          app: api
          version: v1

  ratelimit-filter:
    type: EnvoyFilterIstio
    namespace: istio-test
    settings:
      configPatches:
        - applyTo: EXTENSION_CONFIG
          match:
            context: SIDECAR_INBOUND
          patch:
            operation: ADD
            value:
              name: envoy.filter.http.wasm
              typed_config:
                "@type": type.googleapis.com/udpa.type.v1.TypedStruct
                type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
                value:
                  config:
                    configuration:
                      "@type": type.googleapis.com/google.protobuf.StringValue
                      value: "rate_limit_filter"
                    root_id: "rate_limit_filter"
                    vm_config:
                      code:
                        remote:
                          http_uri:
                            uri: https://github.com/layer5io/image-hub/raw/master/rate-limit-filter/pkg/rate_limit_filter_bg.wasm
                          
                      runtime: envoy.wasm.runtime.v8
                      vm_id: rate_limit_filter
                      configuration:
                        "@type": type.googleapis.com/google.protobuf.StringValue
                        value: "WwogIHsKICAgICJuYW1lIjogIi9wdWxsIiwKICAgICJydWxlIjp7CiAgICAgICJydWxlVHlwZSI6ICJyYXRlLWxpbWl0ZXIiLAogICAgICAicGFyYW1ldGVycyI6WwogICAgICAgIHsiaWRlbnRpZmllciI6ICJFbnRlcnByaXNlIiwgImxpbWl0IjogMTAwMH0sCiAgICAgICAgeyJpZGVudGlmaWVyIjogIlRlYW0iLCAibGltaXQiOiAxMDB9LAogICAgICAgIHsiaWRlbnRpZmllciI6ICJQZXJzb25hbCIsICJsaW1pdCI6IDEwfQogICAgICBdCiAgICB9CiAgfSwKICB7CiAgICAibmFtZSI6ICIvYXV0aCIsCiAgICAicnVsZSI6ewogICAgICAicnVsZVR5cGUiOiAibm9uZSIKICAgIH0KICB9LAogIHsKICAgICJuYW1lIjogIi9zaWdudXAiLAogICAgInJ1bGUiOnsKICAgICAgInJ1bGVUeXBlIjogIm5vbmUiCiAgICB9CiAgfSwKICB7CiAgICAibmFtZSI6ICIvdXBncmFkZSIsCiAgICAicnVsZSI6ewogICAgICAicnVsZVR5cGUiOiAibm9uZSIKICAgIH0KICB9Cl0="
                      allow_precompiled: true
      workloadSelector:
        labels:
          app: api
          version: v1
    dependsOn:
      - generic-istio-filter

Join the Community!

Our projects are community-built and welcome collaboration. ๐Ÿ‘ Be sure to see the Layer5 Community Welcome Guide for a tour of resources available to you and jump into our Slack!

MeshMates

Find your MeshMate

MeshMates are experienced Layer5 community members, who will help you learn your way around, discover live projects and expand your community network. Become a Meshtee today!

Find out more on the Layer5 community.




ย 
Shows an illustrated light mode meshery logo in light color mode and a dark mode meshery logo dark color mode.

Layer5 Cloud Native Community

โœ”๏ธ Join any or all of the weekly meetings on community calendar.
โœ”๏ธ Watch community meeting recordings.
โœ”๏ธ Access the Community Drive by completing a community Member Form.
โœ”๏ธ Discuss in the Community Forum.

Not sure where to start? Grab an open issue with the help-wanted label.

meshery-service-mesh-patterns-action's People

Contributors

chadha93 avatar csengineer1990 avatar kiptoonkipkurui avatar leecalcote avatar pottekkat avatar sayantan1413 avatar utkarshmishra12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.