docs(e2e): Add installType section
@@ -88,19 +88,6 @@ export CTR_TAG=mytag # Optional, 'latest' used by default
make docker-push-init docker-push-osm-controller. # Use docker-build-* targets instead when using kind
```
-#### Use Kind for testing
-Testing implements support for Kind. If `kindCluster` is enabled, a new Kind cluster will be provisioned and it will be automatically used for the test.
-```
--kindCluster
- Creates kind cluster
--kindClusterName string
- Name of the Kind cluster to be created (default "osm-e2e")
--cleanupKindCluster
- Cleanup kind cluster upon exit (default true)
--cleanupKindClusterBetweenTests
- Cleanup kind cluster between tests (default true)
-```
-
#### Test specific flags
Worth mentioning `cleanupTest` is especially useful for debugging or leaving the test in a certain state at test-exit.
@@ -124,6 +111,41 @@ The `ginkgo.focus` flag can be used to run individual tests. The flag should spe
go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -ginkgo.focus="\bSimpleClientServer TCP with SMI policies\b"
```
+#### Setting installType:
+
+The `installType` flag can be used to specify whether the tests should install OSM themselves, or if they will be run on a cluster which already has OSM installed.
+
+```console
+go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=NoInstall
+```
+
+The different values of installType are as follows:
+
+1. `installType=NoInstall`
+
+ The e2es will run on the cluster currently in the user's kubeconfig, which is already expected to have OSM installed prior to the test run. The tests will not install OSM before, or uninstall OSM after any of the tests run. The cluster can be of any CNCF certified distribution (though the k8s version cannot be an outdated version).
+
+1. `installType=KindCluster`
+
+ Each test in the e2e suite will spin up a kind cluster, and run that specific test on that kind cluster. Each test will install OSM via the OSM cli, and then uninstall OSM after the test finishes running. The user is not expected to have created any cluster beforehand.
+
+1. `installType=SelfInstall` (default)
+
+ By default, the e2es will run on the cluster currently in the user's kubeconfig. Each test will install OSM via the OSM cli, and then uninstall OSM after the test finishes running. The cluster can be of any CNCF certified distribution (though the k8s version cannot be an outdated version). The user is should not have OSM installed beforehand.
+
+
+#### Use Kind for testing
+Testing implements support for Kind. If `installType=KindCluster` is enabled, a new Kind cluster will be provisioned and it will be automatically used for the test.
+
+```
+-kindClusterName string
+ Name of the Kind cluster to be created (default "osm-e2e")
+-cleanupKindCluster
+ Cleanup kind cluster upon exit (default true)
+-cleanupKindClusterBetweenTests
+ Cleanup kind cluster between tests (default true)
+```
+
#### Setting test timeout:
The `test.timeout` flag sets a total time limit for all the tests that you are running. If you run the e2es without specifying any timeout limit, the tests will terminate after 10 minutes. To run the tests without any time limit, you should set `test.timeout 0`.
