2020-08-06 06:26:31 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
pwd=$(pwd)
|
2022-02-03 07:41:58 +00:00
|
|
|
hash=$(git describe --match "[0-9].[0-9]-dev*")
|
2020-08-06 06:26:31 +00:00
|
|
|
#
|
|
|
|
## Install Kind
|
2021-06-08 05:48:48 +00:00
|
|
|
curl -Lo $pwd/kind https://kind.sigs.k8s.io/dl/v0.11.0/kind-linux-amd64
|
2020-08-06 06:26:31 +00:00
|
|
|
chmod a+x $pwd/kind
|
|
|
|
|
|
|
|
## Create Kind Cluster
|
2022-02-23 15:52:08 +00:00
|
|
|
if [ -z "${KIND_IMAGE}" ]; then
|
|
|
|
$pwd/kind create cluster
|
|
|
|
else
|
|
|
|
$pwd/kind create cluster --image="${KIND_IMAGE}"
|
|
|
|
fi
|
|
|
|
|
2020-11-24 19:49:08 +00:00
|
|
|
$pwd/kind load docker-image ghcr.io/kyverno/kyverno:$hash
|
|
|
|
$pwd/kind load docker-image ghcr.io/kyverno/kyvernopre:$hash
|
2020-08-06 06:26:31 +00:00
|
|
|
|
|
|
|
pwd=$(pwd)
|
2021-10-29 16:13:20 +00:00
|
|
|
cd $pwd/config
|
2020-08-06 06:26:31 +00:00
|
|
|
echo "Installing kustomize"
|
2020-12-13 06:13:01 +00:00
|
|
|
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
|
|
|
kustomize edit set image ghcr.io/kyverno/kyverno:$hash
|
|
|
|
kustomize edit set image ghcr.io/kyverno/kyvernopre:$hash
|
2021-10-29 16:13:20 +00:00
|
|
|
kustomize build $pwd/config/ -o $pwd/config/install.yaml
|