1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/scripts/create-e2e-infrastruture.sh
Afzal Ansari 5262ed9225
refactor: shell to prevent globbing and word splitting (#3829)
* refactors scripts/create-e2e-infrastruture sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors scripts/deploy-controller.sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors scripts/generate-server-cert.sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* minor changes

Signed-off-by: afzal442 <afzal442@gmail.com>

Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-07 16:46:50 +01:00

27 lines
815 B
Bash
Executable file

#!/bin/sh
set -e
pwd=$(pwd)
hash=$(git describe --match "[0-9].[0-9]-dev*")
#
## Install Kind
curl -Lo "$pwd"/kind https://kind.sigs.k8s.io/dl/v0.11.0/kind-linux-amd64
chmod a+x "$pwd"/kind
## Create Kind Cluster
if [ -z "${KIND_IMAGE}" ]; then
"$pwd"/kind create cluster
else
"$pwd"/kind create cluster --image="${KIND_IMAGE}"
fi
"$pwd"/kind load docker-image ghcr.io/kyverno/kyverno:"$hash"
"$pwd"/kind load docker-image ghcr.io/kyverno/kyvernopre:"$hash"
pwd=$(pwd)
cd "$pwd"/config
echo "Installing kustomize"
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"
kustomize build "$pwd"/config/ -o "$pwd"/config/install.yaml