Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve contributing readme #79

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ tilt-settings.json
tild.d/
tilt_modules/
cluster/local/provider.Tiltfile
tmp/
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following tools are need on the host:
* docker (1.12+) or Docker for Mac (17+)
* git
* make
* golang
* golang (v1.18)
* rsync (if you're using the build container on mac)
* helm (v2.8.2+)
* kubebuilder (v1.0.4+)
Expand Down Expand Up @@ -97,4 +97,4 @@ For example, if you'd like to spin up a DigitalOcean Droplet, run the command
```console
kubectl apply -f examples/compute
```
and check your DigitalOcean account to see if the Droplet has been created.
and check your DigitalOcean account to see if the Droplet has been created.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ crds.clean:
@find $(CRD_DIR) -name *.yaml.sed -delete || $(FAIL)
@$(OK) cleaned generated CRDs

crds.install:
@$(INFO) Installing Provider DigitalOcean CRDs
@$(KUBECTL) apply -f $(CRD_DIR) -R

generate: crds.clean

manifests:
Expand Down
43 changes: 36 additions & 7 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
# Local Environment Setup
# Contributing

We have included some makefile targets to ease the local development process. You will need the following tools installed to get started.
We have included some makefile targets to ease the local development process. You will need the following tools
installed to get started.

- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/)
- [Kubectl](https://kubernetes.io/docs/tasks/tools/)
- [Crossplane CLI](https://crossplane.io/docs/v1.4/getting-started/install-configure.html#install-crossplane-cli) (Not required, but suggested)
## How-Tos

You can then run `make` which will build the project and setup the build submodule. Once this is finished you can then run `make dev` which will boot up a kind cluster, install Crossplane, any CRDs for the project, and then start the provider.
### Getting Started

You can run `make dev-clean` to then cleanup the cluster, or `make dev-restart` which will run the `dev-clean` and then the `dev` targets.
1. Install [Kind][0].
2. Install [Kubectl][1].
3. Install [Crossplane CLI][2] (Not required, but suggested).
4. Install `go` version `1.18`.
5. Run `make submodules` to initialize the submodules.
6. Run `make`.
7. Run `make dev-kind` to start the cluster and install the provider.
8. Run `make dev-provider` to start the provider controller.
9. Rerun `make dev-provider` to restart the provider controller.

## Explanations

### Makefile

#### Working with the cluster

- `make dev-clean` destroy the `kind` cluster.
- `make dev-kind` will start the `kind` cluster and install `Crossplane` and any `CRDs` for the project.
- `make dev-provider` will start the provider controller.
- `make dev` will run `dev-kind` and `dev-provider`.

#### Working with CRDs

- `make crds.clean` will remove all `CRDs` from the cluster.
- `make crds.install` will install all `CRDs` from the project.

[0]: https://kind.sigs.k8s.io/docs/user/quick-start/

[1]: https://kubernetes.io/docs/tasks/tools/

[2]: https://docs.crossplane.io/v1.10/getting-started/install-configure#install-crossplane-cli
Loading