This document is intended to provide contributors with an introduction to developing the control plane of the Sedna project. There are two components in our control plane: GM(Global Manager) and LC(Local Controller).
Sedna provides various utilities for development wrapped in make
.
Most scripts require more or less only make
+ bash
on the host, and generally
stick to POSIX utilities. Some scripts use docker
e.g. for image building or
to use docker images containing special tools.
- k8s coding convention
- k8s api convention if you want to add or update api.
Before continuing, you need to follow the prerequisites installation guide if you haven't done it yet.
# build GM
make WHAT=gm
# build LC
make WHAT=lc
# build GM/LC both
make
_output/bin
will contain the freshly built binaries sedna-gm
and sedna-lc
upon a successful build.
If you add or update APIs in pkg/apis/
, you need to run:
- run
bash hack/update-codegen.sh
to update client-go code inpkg/client
.Note: you need to checkout the code to
$GOPATH/src/github.com/kubeedge/sedna
. - run
make crds
to update the api definition. - run
kubectl replace -f build/crds/
to update your kubernetes environment.
Run the following commands to update Go Modules:
go mod tidy
go mod vendor
# Or: hack/update-vendor.sh
Run hack/update-vendor-licenses.sh
to update vendor licenses.
To build the GM/LC base images:
# build GM
make gmimage
# build LC
make lcimage
You need to run the verification tests locally to give your pull request the best chance of being accepted.
To run all verification tests, use this command:
make verify
TBD
TBD
TBD
You can run all of our lints at once with make lint
.
Lints include:
- golangci-lint with a custom config to lint Go sources.
We use GitHub Actions which are configured in .github/workflows in the Sedna repo.