This document helps you get started using the Volcano code base. If you follow this guide and find some problem, please take a few minutes to update this file.
You will need to clone the main volcano
repo to $GOPATH/src/volcano.sh/volcano
for
the below commands to work correctly.
To build volcano all components for your host architecture, go to the source root and run:
make image_bins
the binaries will be generated at .../src/volcano.sh/volcano/_output/bin/linux/amd64/ but if we just make as below
make
then the binaries would be generated at .../src/volcano.sh/volcano/_output/bin/
To build a specific component for your host architecture, go to
the source root and run make <component name>
:
make vc-scheduler
Build the containers in your local docker cache:
make images
To build cross-platform images:
make images DOCKER_PLATFORMS="linux/amd64,linux/arm64" BUILDX_OUTPUT_TYPE=registry IMAGE_PREFIX=[yourregistry]
If you want to make a local change and test some component, say vc-controller-manager
, you
could do:
Under volcano.sh/volcano repo
pwd
The path should be
.../src/volcano.sh/volcano
Set up environment variables HUB and TAG by
export HUB=docker.io/yourrepo
export TAG=citadel
Make some local change of the code, then build vc-controller-manager
make image.vc-controller-manager
Use the following command to build the deploy yaml files:
make generate-yaml
You can delete any build artifacts with:
make clean
You can run all the available unit tests with:
make unit-test
You can run all the available e2e tests with:
make vcctl
make images
make e2e
If you want to run e2e test in a existing cluster with volcano deployed, run the following:
export VC_BIN= need to set vcctl binary path (eg:.../src/volcano.sh/volcano/_output/bin/)
KUBECONFIG=${KUBECONFIG} go test ./test/e2e
You can automatically format the source code to follow our conventions by going to the top of the repo and entering:
./hack/update-gofmt.sh
You can run all the verification we require on your local repo by going to the top of the repo and entering:
make verify
Volcano uses Go Modules to manage its dependencies. If you want to add or update a dependency, running:
go get dependency-name@version
go mod tidy
go mod vendor
Note: Go's module system, introduced in Go 1.11, provides an official dependency management solution built into the go command.
Make sure GO111MODULE
env is not off
before using it.
Before sending pull requests you should at least make sure your changes have passed both unit and the verification. We only merge pull requests when all tests are passing.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )