Install kind as part of e2e tests

This commit is contained in:
Phani Teja Marupaka
2020-01-16 15:49:11 -08:00
parent 4d07004977
commit 13c891f54a
2 changed files with 14 additions and 4 deletions

View File

@@ -202,7 +202,7 @@ test-examples-kustomize-against-HEAD: $(MYGOBIN)/kustomize $(MYGOBIN)/mdrip
./hack/testExamplesAgainstKustomize.sh HEAD
.PHONY:
test-examples-e2e-kustomize: $(MYGOBIN)/mdrip
test-examples-e2e-kustomize: $(MYGOBIN)/mdrip $(MYGOBIN)/kind
( \
set -e; \
/bin/rm -f $(MYGOBIN)/kustomize; \
@@ -257,6 +257,16 @@ $(MYGOBIN)/helm:
rm -rf $$d \
)
$(MYGOBIN)/kind:
( \
set -e; \
d=$(shell mktemp -d); cd $$d; \
wget -O ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(shell uname)-amd64; \
chmod +x ./kind; \
mv ./kind $(MYGOBIN); \
rm -rf $$d; \
)
.PHONY: clean
clean: kustomize-external-go-plugin-clean
go clean --cache

View File

@@ -168,8 +168,8 @@ MYGOBIN=$GOPATH/bin
Delete any existing kind cluster and create a new one. By default the name of the cluster is "kind"
<!-- @deleteAndCreateKindCluster @testE2EAgainstLatestRelease -->
```
kind delete cluster;
kind create cluster;
$MYGOBIN/kind delete cluster;
$MYGOBIN/kind create cluster;
```
Use the kustomize binary in MYGOBIN to apply a deployment, fetch the status and verify the status.
@@ -198,7 +198,7 @@ test 1 == \
Clean-up the cluster
<!-- @createKindCluster @testE2EAgainstLatestRelease -->
```
kind delete cluster;
$MYGOBIN/kind delete cluster;
```
###Next Exercise