Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active April 3, 2024 12:19
Show Gist options
  • Save vfarcic/c3053a9639f3ce9ab344ad6addc45a6c to your computer and use it in GitHub Desktop.
Save vfarcic/c3053a9639f3ce9ab344ad6addc45a6c to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/vfarcic/c3053a9639f3ce9ab344ad6addc45a6c
##################################################
# Mastering Kubernetes Testing Kyverno Chainsaw! #
##################################################
# Additional Info:
# - Chainsaw: https://kyverno.github.io/chainsaw
# - Kubernetes Testing Techniques with KUTTL: https://youtu.be/ZSTQQNu4laY
# - Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally: https://youtu.be/Z7EnwBaJzCk
#########
# Setup #
#########
# Make sure that Docker is up and running.
git clone https://github.com/vfarcic/crossplane-sql
cd crossplane-sql
git pull
git checkout chainsaw
# Add Chainsaw to `devbox.json`
# Watch FIXME: if you are not familiar with Devbox. Alternatively, you can skip Devbox and install all the tools listed in `devbox.json` yourself.
devbox shell
task cluster-create
##############################
# Kyverno Chainsaw in Action #
##############################
chainsaw test
cat tests/aws/chainsaw-test.yaml
cat tests/common/install.yaml
cat tests/aws/chainsaw-test.yaml
cat tests/common/assert-install.yaml
cat tests/aws/assert-install.yaml
cat tests/aws/chainsaw-test.yaml
cat tests/common/db.yaml
cat tests/common/assert-db.yaml
cat tests/aws/chainsaw-test.yaml
###########
# Destroy #
###########
task cluster-destroy
git checkout main
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment