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.
docker run {image}
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'
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
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 .)
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 .)
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