Skip to content

Commit

Permalink
remove minikube (#3220)
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <[email protected]>
Co-authored-by: Per Goncalves da Silva <[email protected]>
  • Loading branch information
perdasilva and Per Goncalves da Silva authored May 7, 2024
1 parent b785bc7 commit 66f8571
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 43 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ __pycache__/
/build
/apiserver.local.config
e2e.namespace
minikube.kubeconfig
apiserver.crt
apiserver.key

Expand Down
4 changes: 1 addition & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down
13 changes: 0 additions & 13 deletions doc/install/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 0 additions & 7 deletions scripts/build_bare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 1 addition & 7 deletions scripts/build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_e2e_bare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 0 additions & 11 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```

0 comments on commit 66f8571

Please sign in to comment.