Skip to content

Commit ad7c17c

Browse files
committed
chore: make linter happy
Signed-off-by: Oleksii Kurinnyi <[email protected]>
1 parent 56837bd commit ad7c17c

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Owners of the repository will watch out for and review new PRs.
2929

3030
If comments have been given in a review, they have to be addressed before merging.
3131

32-
After addressing review comments, dont forget to add a comment in the PR afterward, so everyone gets notified by Github and knows to re-review.
32+
After addressing review comments, don't forget to add a comment in the PR afterward, so everyone gets notified by Github and knows to re-review.
3333

3434
## CI
3535

36-
#### GitHub actions
36+
### GitHub actions
3737

3838
- [Next Dockerimage](https://github.com/devfile/devworkspace-operator/blob/main/.github/workflows/dockerimage-next.yml) action builds main branch and pushes it to [quay.io/devfile/devworkspace-controller:next](https://quay.io/repository/devfile/devworkspace-controller?tag=latest&tab=tags)
3939
- [Code Coverage Report](./.github/workflows/code-coverage.yml) action creates a code coverage report using [codecov.io](https://about.codecov.io/).
@@ -50,7 +50,7 @@ To build, test and debug the DevWorkspace Operator the following development too
5050
- git
5151
- sed
5252
- jq
53-
- yq (python-yq from https://github.com/kislyuk/yq#installation, other distributions may not work)
53+
- yq (python-yq from <https://github.com/kislyuk/yq#installation>, other distributions may not work)
5454
- skopeo (if building the OLM catalogsource)
5555
- podman or docker
5656

@@ -62,20 +62,19 @@ system.
6262

6363
On macOS, the default `make` utility might be outdated, leading to issues with some `Makefile` targets. To resolve this, it's recommended to install a newer version of `make` using Homebrew and ensure it's prioritized in your system's `$PATH`.
6464

65-
1. **Install Homebrew `make`**:
65+
1. Install Homebrew `make`:
6666

6767
```bash
6868
brew install make
6969
```
7070

71-
2. **Update your `$PATH`**:
72-
Add the Homebrew `make` executable to your `$PATH` by adding the following line to your shell configuration file (e.g., `~/.zshrc`, `~/.bash_profile`):
71+
2. Add the Homebrew `make` executable to your `$PATH` by adding the following line to your shell configuration file (e.g., `~/.zshrc`, `~/.bash_profile`):
7372

7473
```bash
7574
export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
7675
```
7776

78-
After adding, reload your shell configuration (e.g., `source ~/.zshrc` or `source ~/.bash_profile`) or open a new terminal session.
77+
After adding, reload your shell configuration (e.g., `source ~/.zshrc` or `source ~/.bash_profile`) or open a new terminal session.
7978

8079
### Makefile
8180

@@ -107,13 +106,16 @@ To see all rules supported by the makefile, run `make help`
107106

108107
1. Fork [devfile/devworkspce-operator](https://github.com/devfile/devworkspace-operator) and clone your fork locally
109108
2. Export the `DWO_IMG` environment variable. For example:
109+
110110
```bash
111111
export DWO_IMG=quay.io/mloriedo/devworkspace-controller:dev
112112
```
113+
113114
:warning: _You need write privileges on this container registry repository. The DevWorkspace controller image will be
114115
pushed there during build._
115116
3. If your changes include some update to the Devfile or DevWorkspace schema set some environment variables and run
116117
`go mod` to point to your fork instead of devfile/api:
118+
117119
```bash
118120
export DEVFILE_API_REPO=github.com/l0rd/api # <== your devfile/api fork
119121
export DEVFILE_API_BRANCH=my-branch-name # <== the branch of your fork
@@ -122,17 +124,23 @@ pushed there during build._
122124
go mod download && \
123125
go mod tidy
124126
```
127+
125128
4. Build the controller go code, build the container image and publish it to the container registry:
129+
126130
```bash
127131
make docker
128132
```
133+
129134
5. Install cert-manager (can be skipped on OpenShift):
135+
130136
```bash
131137
make install_cert_manager && \
132138
kubectl wait --for=condition=Available -n cert-manager deployment/cert-manager
133139
```
140+
134141
6. Finally deploys the CRDs and the controller to the current cluster:
135-
```
142+
143+
```bash
136144
make install # <== this command copies the CRDs definition
137145
# creates the namespace for the controller in the cluster
138146
# downloads and runs kustomize to build the manifests
@@ -159,7 +167,8 @@ make run
159167
```
160168
161169
> Note: The operator requires internet access from containers to work. By default, `crc setup` may not provision this, so it's necessary to configure DNS for Docker:
162-
> ```
170+
>
171+
> ```text
163172
> # /etc/docker/daemon.json
164173
> {
165174
> "dns": ["192.168.0.1"]
@@ -210,26 +219,32 @@ make disconnect-debug-webhook-server
210219
make update_devworkspace_api update_devworkspace_crds # first commit
211220
make generate_all # second commit
212221
```
222+
213223
Example of the devfile API update [PR](https://github.com/devfile/devworkspace-operator/pull/797)
214224

215225
### Remove controller from your K8s/OS Cluster
226+
216227
To uninstall the controller and associated CRDs, use the Makefile uninstall rule:
228+
217229
```bash
218230
make uninstall
219231
```
232+
220233
This will delete all custom resource definitions created for the controller, as well as the `devworkspace-controller` namespace.
221234

222235
### Build a custom OLM bundle
223236

224237
In order to build a custom bundle, the following environment variables should be set:
238+
225239
| variable | purpose | default value |
226240
|---|---|---|
227241
| `DWO_BUNDLE_IMG` | Image used for Operator bundle image | `quay.io/devfile/devworkspace-operator-bundle:next` |
228242
| `DWO_INDEX_IMG` | Image used for Operator index image | `quay.io/devfile/devworkspace-operator-index:next` |
229243
| `DEFAULT_DWO_IMG` | Image used for controller when generating defaults | `quay.io/devfile/devworkspace-controller:next` |
230244

231245
To build the index image and register its catalogsource to the cluster, run
232-
```
246+
247+
```bash
233248
make generate_olm_bundle_yaml build_bundle_and_index register_catalogsource
234249
```
235250

0 commit comments

Comments
 (0)