Skip to content

Commit baa17ad

Browse files
committed
Improve contributing documentation
I added some things in the contributing documentation that I realized we didn't cover well after we onboarded Victor to the project. Notably: - Note that the Red Hat Authentication extension is required by VS Code OpenShift Toolkit - Explain that different commands are used to run the different suites, and explain why the suites are split up - List the different types of clusters that have been well tested with the extension, and the tradeoffs of using them Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent c7c5c3f commit baa17ad

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ There are only a few guidelines that we need contributors to follow.
1111
* [Node.js](https://nodejs.org/) v16.17.0 or higher
1212
* It is recommended to set up `nvm` to manage different versions of node, which can be installed by following the instructions [here](https://github.com/nvm-sh/nvm#installing-and-updating).
1313
* To use the current recommended version for this project (in`./nvmrc`), run `nvm use`.
14+
* [Red Hat Authentication](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-redhat-account) VS Code plugin (VS Code will prompt to install this when you launch the extension if you don't have it)
1415

1516
2. Fork and clone the repository
1617
3. `cd vscode-openshift-tools`
@@ -21,6 +22,55 @@ There are only a few guidelines that we need contributors to follow.
2122
```
2223
5. Open the folder in VS Code
2324

25+
## Getting a cluster to use with the extension
26+
27+
In order to use many of the features of the extension,
28+
you will need an OpenShift or Kubernetes cluster.
29+
Here is a list of the clusters that are known to work well with the extension,
30+
along with the tradeoffs in using them:
31+
- **[OpenShift Local](https://developers.redhat.com/products/openshift-local/overview) (formerly `crc`)**
32+
- Pros:
33+
- Fully featured OpenShift cluster
34+
- You have admin access to the cluster
35+
- The binary used to set up the cluster is bundled in VS Code OpenShift Toolkit
36+
- Cons:
37+
- Requires a lot of disk space, memory, and CPU
38+
- Takes a while to start up
39+
- Some Operators that are set up on OpenShift Dev Sandbox by default are not present on the cluster
40+
- You might need to [tweak the settings in order to allocate more RAM](https://crc.dev/crc/getting_started/getting_started/configuring/#_configuring_the_instance) to the cluster in order to get it working
41+
- **[OpenShift Dev Sandbox](https://developers.redhat.com/developer-sandbox)**
42+
- Pros:
43+
- Fully featured OpenShift cluster
44+
- High availability
45+
- Doesn't run on your computer
46+
- Many of the Operators you need are installed by default
47+
- You can expose applications deployed to the cluster publicly
48+
- Cons:
49+
- Free trial that ends after 30 days, after which you must pay or your cluster gets wiped
50+
- No admin access
51+
- You can only access one namespace
52+
- Logging in to the cluster is a bit more involved than with a local cluster
53+
- **[Minikube](https://minikube.sigs.k8s.io/docs/)**
54+
- Pros:
55+
- Lightweight compared to OpenShift Local (`crc`)
56+
- No username/password system, so you don't need to login to use the cluster. The binary sets up the credentials in your `~/.kube/config`.
57+
- Cons:
58+
- Not OpenShift, so it can't be used to test OpenShift-specific features
59+
- Some features require additional commands to set up, eg. [dashboard](https://minikube.sigs.k8s.io/docs/handbook/dashboard/)
60+
- **[kind](https://kind.sigs.k8s.io/)**
61+
- Pros:
62+
- Even more lightweight than Minikube
63+
- No username/password system, so you don't need to login to use the cluster. The binary sets up the credentials in your `~/.kube/config`.
64+
- Cons:
65+
- Requires a functioning `docker` or `podman` installation
66+
- Not OpenShift, so it can't be used to test OpenShift-specific features
67+
- Some features require additional commands to set up eg. [dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/)
68+
69+
Here are some Kubernetes clusters that currently don't work well with VS Code OpenShift Toolkit
70+
(see [this issue on odo](https://github.com/redhat-developer/odo/issues/7032)):
71+
- MicroShift (or crc MicroShift)
72+
- k3s
73+
2474
## Run and debug the extension locally
2575

2676
1. Build with the following command at least once before running in debug mode:
@@ -77,6 +127,11 @@ Then, you can modify the CSS and attributes of elements in order to experiment w
77127
78128
## Running the tests
79129
130+
There are four test suites, each of which require a separate `npm` command to run.
131+
This is the case, since we separated the tests that require a cluster from those that don't.
132+
We also separated the UI tests from the non-UI tests,
133+
since the UI tests tend to take much longer to run and are more flaky than the non-UI tests.
134+
80135
### Running the unit test suite
81136
82137
You don't need to be connected to a cluster in order for the tests to work properly.

0 commit comments

Comments
 (0)