Development Setup¶
Environmental Preparation¶
Kube-OVN uses Golang 1.18 to develop and Go Modules to manage dependency, please check env GO111MODULE="on"
。
gosec is used to scan for code security related issues and requires to be installed in the development environment:
go get github.com/securego/gosec/v2/cmd/gosec
To reduce the size of the final generated image, Kube-OVN uses some of the Docker buildx experimental features, please update Docker to the latest version and enable buildx:
docker buildx create --use
Build Image¶
Use the following command to download the code and generate the image required to run Kube-OVN:
git clone https://github.com/kubeovn/kube-ovn.git
cd kube-ovn
make release
To build an image to run in an ARM environment, run the following command:
make release-arm
Building the Base Image¶
If you need to change the operating system version, dependencies, OVS/OVN code, etc., you need to rebuild the base image.
The Dockerfile used for the base image is dist/images/Dockerfile.base
.
Build instructions:
# build x86 base image
make base-amd64
# build arm base image
make base-arm64
Run E2E¶
Kube-OVN uses KIND to build local Kubernetes cluster, j2cli to render templates, and Ginkgo to run test cases. Please refer to the relevant documentation for dependency installation.
Run E2E locally:
make kind-init
make kind-install
make e2e
To run the Underlay E2E test, run the following commands:
make kind-init
make kind-install-underlay
make e2e-underlay-single-nic
Created: June 30, 2022