diff --git a/.gitignore b/.gitignore index 5c77f3d21b..892ea66dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -449,7 +449,6 @@ __pycache__/ /build /apiserver.local.config e2e.namespace -minikube.kubeconfig apiserver.crt apiserver.key diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5af612f371..f3c2ef0e92 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -15,10 +15,8 @@ | Requirement | install docs | |-------------|----------------------| -| Minikube | [Minikube docs] | | Kind | [Kind docs] | -[Minikube docs]: https://minikube.sigs.k8s.io/docs/start [Kind docs]: https://kind.sigs.k8s.io/docs/user/quick-start ### Usage @@ -40,7 +38,7 @@ To run the e2e tests locally: $ make e2e-local ``` -**NOTE:** Command `make e2e-local` supports Minikube and Kind environments. If you want to run the e2e tests on Minikube, you need to make sure Minikube is deployed in the local environment. If you want to run the e2e tests on Kind, you need to make sure Kind is deployed in the local environment and switch the kubeconfig to an existing Kind cluster. +**NOTE:** If you want to run the e2e tests, you need to make sure Kind is deployed in the local environment and switch the kubeconfig to an existing Kind cluster. To run a specific e2e test locally: diff --git a/doc/install/install.md b/doc/install/install.md index 4be3e31aba..aebf2d44be 100644 --- a/doc/install/install.md +++ b/doc/install/install.md @@ -16,19 +16,6 @@ kubectl create -f deploy/upstream/quickstart/olm.yaml Check out the latest [releases on github](https://github.com/operator-framework/operator-lifecycle-manager/releases) for release-specific install instructions. -## Run locally with minikube - -This command starts minikube, builds the OLM containers locally with the minikube-provided docker, and uses the local configuration in [local-values.yaml](local-values.yaml) to build localized deployment resources for OLM. - -```bash -# To install and run locally -$ make run-local -``` - -You can verify that the OLM components have been successfully deployed by running `kubectl -n olm get deployments` - -**NOTE** It is recommended for development purposes and will use the source locally - ## OpenShift **IMPORTANT:** OLM is installed by default in OpenShift 4.0 and above. diff --git a/scripts/build_bare.sh b/scripts/build_bare.sh index e0520fa02f..5bcccf8f0a 100644 --- a/scripts/build_bare.sh +++ b/scripts/build_bare.sh @@ -5,12 +5,5 @@ set -e -if [ -z "$NO_MINIKUBE" ]; then - ps x | grep -q [m]inikube || minikube start --kubernetes-version="v1.11.0" --extra-config=apiserver.v=4 || { echo 'Cannot start minikube.'; exit 1; } - eval $(minikube docker-env) || { echo 'Cannot switch to minikube docker'; exit 1; } - kubectl config use-context minikube - umask 0077 && kubectl config view --minify --flatten --context=minikube > minikube.kubeconfig -fi - kubectl delete crds --all kubectl create namespace $(cat $(pwd)/e2e.namespace) diff --git a/scripts/build_local.sh b/scripts/build_local.sh index 19c342e2c4..38a4371b6f 100755 --- a/scripts/build_local.sh +++ b/scripts/build_local.sh @@ -6,13 +6,7 @@ set -e set -o xtrace -[ -x "$(command -v kind)" ] && [[ "$(kubectl config current-context)" =~ ^kind-? ]] && KIND=1 NO_MINIKUBE=1 - -if [ -z "$NO_MINIKUBE" ]; then - pgrep -f "[m]inikube" >/dev/null || minikube start "${MINIKUBE_ARGS}" --extra-config=apiserver.v=4 || { echo 'Cannot start minikube.'; exit 1; } - eval "$(minikube docker-env)" || { echo 'Cannot switch to minikube docker'; exit 1; } - kubectl config use-context minikube -fi +[ -x "$(command -v kind)" ] && [[ "$(kubectl config current-context)" =~ ^kind-? ]] && KIND=1 docker build -f e2e.Dockerfile -t quay.io/operator-framework/olm:local -t quay.io/operator-framework/olm-e2e:local ./bin docker build -f test/e2e/hang.Dockerfile -t hang:10 ./bin diff --git a/scripts/run_e2e_bare.sh b/scripts/run_e2e_bare.sh index fd3c74b484..e0a302adfa 100755 --- a/scripts/run_e2e_bare.sh +++ b/scripts/run_e2e_bare.sh @@ -14,4 +14,4 @@ fi echo "${test_flags}" go test -c -tags=bare -mod=vendor -v -o e2e-bare github.com/operator-framework/operator-lifecycle-manager/test/e2e -./e2e-bare -test.v -test.timeout 20m ${test_flags} -kubeconfig=${KUBECONFIG:-minikube.kubeconfig} -namespace=$(cat e2e.namespace) -olmNamespace=operator-lifecycle-manager -dummyImage=hang:10 +./e2e-bare -test.v -test.timeout 20m ${test_flags} -kubeconfig=${KUBECONFIG:} -namespace=$(cat e2e.namespace) -olmNamespace=operator-lifecycle-manager -dummyImage=hang:10 diff --git a/test/e2e/README.md b/test/e2e/README.md index 7809dae480..90fadd21c4 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -4,7 +4,6 @@ This runs a series of tests against the Kubernetes API to verify that OLM is fun ## Requirements -* Minikube > 0.25.0 * Helm > 2.7.0 ## How to use @@ -55,13 +54,3 @@ make file and use `-dryRun` with `-focus` and see if the regex would trigger you ## Build infrastructure Note that the make file target `e2e-local` is executed by the github workflow `.github/workflows/e2e-tests.yml` and uses two parallel `go test` processes. - -## Running on minikube - -The e2e suite is also runnable on a minikube cluster. First spin up the minikube cluster manually with the desired provisioner, -then run `make run-local` to deploy OLM onto the cluster. Tests can be run by invoking ginkgo and passing the required command line -arguments to the test suite. For example to run a specific test: - -```bash -GO111MODULE=on go run github.com/onsi/ginkgo/v2/ginkgo -focus "static provider" -v --progress ./test/e2e -- -namespace=operators -olmNamespace=olm -dummyImage=bitnami/nginx:latest -``` \ No newline at end of file