Skip to content

mattwithoos/kusteval

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kusteval - K8s Kustomize + Kubeval Github Action

Allows for the evaluation of kustomize files "in-memory", so that you don't have to generate, store or continually update generated Kubernetes files in Git.

Usage

Locally

docker run {image}

Github Action

Note you should probably target a specific release rather than using mattwithoos/kusteval@main

on: push
name: mattwithoos/kusteval K8s validation
jobs:
  kusteval-pass:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Kusteval PASS test
      uses: mattwithoos/kusteval@main
      with:
        kustomize_ver: '4.5.7'
        target_dir: './tests/overlays/pass-test'

Inputs

Envs are set to be Github Actions friendly INPUT_KUSTOMIZE_VER - Defaults to 4.5.7 INPUT_TARGET_DIR - Path to the target kustomize file

Tests

Run a sample PASS test

docker run -it -v "$(pwd)"/tests:/tests -e INPUT_KUSTOMIZE_VER='4.5.7' -e INPUT_TARGET_DIR=/tests/overlays/pass-test $(docker build -q .)

Run a sample FAIL test

docker run -it -v "$(pwd)"/tests:/tests -e INPUT_KUSTOMIZE_VER='4.5.7' -e INPUT_TARGET_DIR=/tests/overlays/fail-test $(docker build -q .)

TODO

Please feel welcome to open a PR for anything - with a priority on:

  • I could use some help "testing" a failure and having it return successful if it fails (see my workflow)
  • General review for best practice

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published