Developer Guide
Getting Started ¶
You must have a working Go environment and then fork the repo and clone it:
git clone https://github.com/<your-username>/nauticus.git
cd nauticus
Do not forget to add the upstream repository to rebase when needed.
git remote add upstream https://github.com/edixos/nauticus.git
Building & Testing ¶
First you need a local kubernetes cluster if you want to run the controller againt a real API Server, you can create a kind cluster for this purpose.
kind create cluster --image kindest/node:v1.24.1 --wait 5m --name nauticus
The project uses the make
build system. It'll run code generators, tests and
static code analysis.
Start by displaying the help target of make to discover what we can do with make.
make help
Initialize your dev environment ¶
-
First Install the
golangci-lint
toolInstall golangci-lint toolmake golangci-lint
-
Build the controller locally
Build the controller locallymake build
-
Run tests
Run tests locally4. Run the controllermake tests
Run the controller locally5. Lint the codemake manifests kubectl apply -f config/crd/bases/nauticus.io_spaces.yaml make run
Run the controller locallymake golint
Documentation ¶
We use mkdocs material. See /docs
for the source code.
Install mkdocs using pip:
pip install mkdocs-material
When writing documentation it is advised to run the mkdocs server with livereload:
mkdocs serve
Open http://localhost:8000
in your browser.
We generate CRD documentation using crddoc, Build the api documentation:
make apidoc