Give your pipelines super powers with Kanvas Snapshot GitHub Actions.
- See your deployment before you merge.
- Connect Kanvas to your GitHub repo and see changes pull request-to-pull request.
- Get snapshots of your infrastructure directly in your PRs.
The Kanvas Snapshot GitHub Action allows you to generate and snapshot a visual diagram of your infrastructure as code whether that be Kubernetes manifests, Helm charts, or Docker compose files. This action automates the process of creating Kanvas Snapshots.
- Snapshot Generation: Create visual snapshots of infrastructure as code, complete with associated resources.
- Delivery via Email or PR Comment: Snapshots can be delivered via email, image in your design catalog, or via comment in a GitHub pull request.
- Plugins:
- See Helm Kanvas Snapshot plugin
- See Kubectl Kanvas Snapshot plugin
See Configuring Kanvas Snapshots in Layer5 Docs.
The filesystem-approach asks for your relative file-path and automatically merges all the yaml files together to bundle up into one. So you might like to give the root directory where all the yamls are located. It doesn't move recursevely in internal folders, so only the first level yaml files are checked.name: 'MeshMap Snapshot With File-located in Fs' on: # rebuild any PRs and main branch changes pull_request: push: branches: - main - master - 'releases/*'
jobs: test: # make sure the action works on a clean machine without building runs-on: ubuntu-latest steps: - name: Set PR number # To comment the final status on the Pull-request opened in any repository run: | export pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") echo "PULL_NO=$pull_number" >> $GITHUB_ENV - uses: actions/checkout@v3 # the repository where your infrastructure is located - uses: actions/checkout@v3 #this step would go and would be no longer needed to be written with: path: action repository: layer5labs/meshmap-snapshot - id: test_result uses: layer5labs/[email protected] with: githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...." mesheryToken: ${{ secrets.MESHERY_TOKEN }} # Meshery Cloud Authentication token, signin to meshery-cloud to get one, example: ey..... prNumber: ${{ env.PULL_NO }} # auto-filled from the above step application_type: "Kubernetes Manifest" # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart" filePath: "action/tests/manifest-test" # relative file-path from the root directory in the github-runner env, you might require to checkout the repository as described in step 2
name: 'MeshMap Snapshot With URL-Upload' on: # rebuild any PRs and main branch changes pull_request: push: branches: - main - master - 'releases/*'
jobs: test: # make sure the action works on a clean machine without building runs-on: ubuntu-latest steps: - name: Set PR number # To comment the final status on the Pull-request opened in any repository run: | export pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") echo "PULL_NO=$pull_number" >> $GITHUB_ENV - uses: actions/checkout@v3 #this step would go and would be no longer needed to be written with: path: action repository: layer5labs/meshmap-snapshot - id: test_result uses: layer5labs/[email protected] with: githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...." mesheryToken: ${{ secrets.MESHERY_TOKEN }} # Meshery Cloud Authentication token, signin to meshery-cloud to get one, example: ey..... prNumber: ${{ env.PULL_NO }} # auto-filled from the above step application_type: "Helm Chart" # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart" application_url: "https://github.com/meshery/meshery.io/raw/master/charts/meshery-v0.6.88.tgz"
The following is a list of Action Inputs.
designId: # id of input #deprecated
description: "The design uuid, example: 3c116d0a-49ea-4294-addc-d9ab34210662"
required: false
default: '{}'
applicationId: #deprecated
description: "The application uuid, example: 3c116d0a-49ea-4294-addc-d9ab34210662"
required: false
githubToken:
description: "Github PAT token"
required: true
providerToken:
description: "Meshery Authentication Provider Token"
required: true
prNumber:
description: "The Pull request on which comment has to be made"
required: false
default: 0
filePath:
description: "The relative filepath of the location where the manifests are stored"
required: false
application_type:
description: "Application upload type, any of the three, Kubernetes Manifest, Docker Compose, Helm Chart"
required: true
application_url:
description: "Application's source url where the manifests or data is stored"
required: false
We warmly welcome all contributors! Our projects are community-built and each welcomes open collaboration. As you get started, please review this project's contributing guidelines. Whether you are a user or code contributor and whether you're opening an issue or a pull request, know that any form of your engagement is considered contribution and is appreciated. Contributors are expected to adhere to the CNCF Code of Conduct.
Join us in the discussion forum and on Slack to learn more about Layer5 and its community! Make sure you see the newcomer's guide for a tour of resources available to you.
✔️ Watch community meeting recordings.
✔️ Fill-in a community member form to gain access to community resources.
✔️ Discuss in the Community Forum.
✔️ Explore more in the Community Handbook.
- Find us on Twitter: @layer5, @mesheryio, and @smp_spec.
- Visit us on LinkedIn: Layer5, Meshery, and Cloud Native Performance.
- Subscribe on Youtube.
All of Layer5's projects are available as open source under the terms of the Apache 2.0 License.