Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.7 KB

development.md

File metadata and controls

67 lines (45 loc) · 1.7 KB

Development Guide

How to build Kube-OVN

Prerequisites:
  1. Kube-OVN is developed by Go 1.16 and uses Go Modules to manage dependency. Make sure GO111MODULE="on".

  2. We also use gosec to inspects source code for security problems.

go get github.com/securego/gosec/v2/cmd/gosec
  1. To minimize image size we use docker experimental buildx features.

​ For version < Docker 19.03, please enable it manually through the reference.

​ Buildx could also be installed from official doc.

​ For first compilation, create a new builder instance.

docker buildx create --use
Make:
git clone https://github.com/kubeovn/kube-ovn.git
go get -u github.com/securego/gosec/cmd/gosec
cd kube-ovn
make release

How to run e2e tests

Kube-OVN uses KIND to setup a local Kubernetes cluster and j2cli to render template and Ginkgo as the test framework to run the e2e tests.

go get -u github.com/onsi/ginkgo/ginkgo
go get -u github.com/onsi/gomega/...

make kind-init
make kind-install
# wait all pods ready
make e2e

For Underlay mode e2e tests with single nic, run following commands:

make kind-init
make kind-install-underlay
# wait all pods ready
make e2e-underlay-single-nic

ARM support

If you want to run Kube-OVN on arm64 platform, you need to build the arm64 images with docker multi-platform build.

make release-arm