Skip to content

Commit b5cbc45

Browse files
committed
Improve HACKING.md
1 parent 3ff5c06 commit b5cbc45

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

HACKING.md

+30-30
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,45 @@
22

33
## Prerequisites
44

5-
In order to build & test korifi yourself, consider installing:
5+
In order to build and test Korifi yourself, consider installing:
66

7-
- [Golang](https://go.dev/doc/install)
8-
- [Golang linters aggregator](https://golangci-lint.run/usage/install/)
7+
- [Go](https://go.dev/doc/install)
8+
- [`golangci-lint`](https://golangci-lint.run/usage/install/)
99
- [Docker](https://docs.docker.com/get-docker/)
10-
- [kind](https://kubernetes.io/docs/tasks/tools/#kind)
11-
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
12-
- [cf cli v8+](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html)
13-
- [helm](https://helm.sh/docs/intro/install/)
14-
- [kbld](https://carvel.dev/kbld/docs/develop/install/)
10+
- [`kind`](https://kind.sigs.k8s.io/docs/user/quick-start/)
11+
- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl)
12+
- [`cf` v8+](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html)
13+
- [Helm](https://helm.sh/docs/intro/install/)
14+
- [`kbld`](https://carvel.dev/kbld/docs/develop/install/)
1515

1616
## Running the tests
1717

18-
```
18+
```sh
1919
make test
2020
```
2121

22-
> Note: Some Controller and API tests run a real Kubernetes API/etcd via the [`envtest`](https://book.kubebuilder.io/reference/envtest.html) package. These tests rely on the CRDs from `controllers` subdirectory.
22+
> **Note**
23+
> Some Controller and API tests run a real Kubernetes API/etcd via the [`envtest`](https://book.kubebuilder.io/reference/envtest.html) package. These tests rely on the CRDs from the `controllers` subdirectory.
2324
> To update these CRDs use the `make generate` target described below.
2425
25-
> Note: e2e tests deploy korifi to a local kind cluster configured with port forwarding and a local docker registry before running a set of tests to interact with the CloudFoundry API. This test suite will fail if you already have Korifi deployed locally on a standard kind cluster, or you have some other process using ports 80 or 443.
26+
> **Note**
27+
> End-to-end tests deploy Korifi to a local `kind` cluster configured with port forwarding and a local Docker registry before running a set of tests to interact with the Cloud Foundry API. This test suite will fail if you already have Korifi deployed locally on a standard `kin`d cluster, or you have some other process using ports `80` or `443`.
2628
2729
## Deploying locally
2830

29-
This is the easiest method for deploying a kick-the-tires installation, or testing code changes end-to-end. It deploys Korifi on a local kind cluster with a local docker registry.
31+
This is the easiest method for deploying a kick-the-tires installation, or testing code changes end-to-end. It deploys Korifi on a local `kind` cluster with a local Docker registry.
3032

31-
```
32-
./scripts/deploy-on-kind <kind-cluster-name>
33+
```sh
34+
./scripts/deploy-on-kind.sh <kind-cluster-name>
3335
```
3436

3537
### User Permissions Disclaimer
3638

37-
When using the deploy-on-kind script, you will get a separate `cf-admin` user by default with which to interact with the cf api.
39+
When using `scripts/deploy-on-kind.sh`, you will get a separate `cf-admin` user by default with which to interact with the CF API.
3840

39-
So when prompted to select a user by the cli you may see something like:
41+
So when prompted to select a user by the CLI you may see something like:
4042

41-
```
43+
```sh
4244
$ cf login
4345
API endpoint: https://localhost
4446

@@ -54,10 +56,10 @@ successfully create resources, but you may notice that the user lacks the permis
5456
This is the above method, but run with `dlv` for remote debugging.
5557

5658
```
57-
./scripts/deploy-on-kind <kind-cluster-name> --debug
59+
./scripts/deploy-on-kind.sh <kind-cluster-name> --debug
5860
```
5961

60-
To remote debug, connect with `dlv` on `localhost:30051` (controller) or `localhost:30052` (api).
62+
To remote debug, connect with `dlv` on `localhost:30051` (`controllers`) or `localhost:30052` (`api`).
6163

6264
A sample VSCode `launch.json` configuration is provided below:
6365

@@ -100,21 +102,19 @@ A sample VSCode `launch.json` configuration is provided below:
100102
101103
```
102104

103-
> Note also that images build for debugging are based on an Ubuntu container
104-
> image, rather than distroless, so deploying with --debug is useful if you plan
105-
> to `kubectl exec` into the running containers for any reason.
105+
> **Note**
106+
> Images built for debugging are based on an Ubuntu container image, rather than distroless, so deploying with `--debug` is useful if you plan to `kubectl exec` into the running containers for any reason.
106107
107108
## Image tagging conventions
108109

109-
We store korifi docker images on docker hub.
110+
We store Korifi container images on [DockerHub](https://hub.docker.com/u/cloudfoundry).
110111
These are:
112+
- [`korifi-api`](https://hub.docker.com/r/cloudfoundry/korifi-api);
113+
- [`korifi-controllers`](https://hub.docker.com/r/cloudfoundry/korifi-controllers).
111114

112-
- korifi-api
113-
- korifi-controllers
114-
115-
Each time a commit is merged into the main branch, a image will be stored tagged with a `dev` tag.
116-
The format is `dev-<next-release>-<commit sha>`.
115+
Each time a commit is merged into the `main` branch, a image will be pushed and tagged with a `dev` tag.
116+
The format is `dev-<next-release>-<commit-sha>`.
117117

118-
When a new korifi version is released, the images will be tagged with the release version, e.g. `0.2.0`.
118+
When a new Korifi version is released, the images will be tagged with the release version, e.g. `0.2.0`.
119119
These will also be tagged as `latest`.
120-
This way the `latest` tag always refers to the latest _release_ and not the head of the main branch.
120+
This way the `latest` tag always refers to the latest _release_ and not the head of the `main` branch.

0 commit comments

Comments
 (0)