The Local Framework is used to run end to end and integration tests on Crossplane. The framework depends on a running instance of Kubernetes.
The framework also provides scripts for starting Kubernetes using minikube
so users can
quickly spin up a Kubernetes cluster.The Local framework is designed to install Crossplane, run tests, and uninstall Crossplane.
- Docker version => 1.2 && < 17.0
- Ubuntu 16 (the framework has only been tested on this version)
- Kubernetes with kubectl configured
- Crossplane
You can choose any Kubernetes flavor of your choice. The test framework only depends on kubectl being configured. The framework also provides scripts to install Kubernetes.
- Minikube (recommended for MacOS): Run minikube.sh to setup a single-node Minikube Kubernetes.
- Minikube v0.28.2 and higher is supported
Starting the cluster on Minikube is as simple as running:
cluster/local/minikube.sh up
To copy Crossplane image generated from your local build into the Minikube VM, run the following commands after minikube.sh up
succeeded:
cluster/local/minikube.sh helm-install
Stopping the cluster and destroying the Minikube VM can be done with:
cluster/local/minikube.sh clean
For complete list of subcommands supported by minikube.sh
, run:
cluster/local/minikube.sh
From the project root do the following:
make build
cluster/local/minikube.sh up
cluster/local/minikube.sh helm-install
Use kubectl
to create and/or delete external resources CRD's in your Minikube cluster
cluster/local/minikube.sh helm-delete
cluster/local/minikube.sh down