Submariner strives to be an open, welcoming community. Substantial tooling is provided to ease the contribution experience.
Submariner provides a standard, shared environment for both development and CI that is maintained in the Shipyard project.
Learn more about working with Shipyard here.
Submariner provides a set of Make targets for building and testing in the standard development environment.
To run all linting:
There are also Make targets for each type of linting:
make gitlint golangci-lint markdownlint yamllint
See the linter configuration files at the root of each repository for details about which checks are enabled.
Note that a few linters only run in CI via GitHub Actions and are not available in the standard development environment.
To run Go unit tests:
To build the Go binaries provided by a repository:
To package those Go binaries into container images:
Note that Submariner will automatically rebuild binaries and images when they have been modified and are required by tests.
To prune all Submariner-provided images, ensuring they will be rebuilt or pulled the next time they’re required:
If you’re using kind to test your changes, you can rebuild the images and reload them using a single command:
The command can restart the pods in order for the new images to take effect. To restart all pods:
make reload-images restart=all
To restart a specific pod, use the image name without the
submariner- prefix, e.g.
make reload-images restart=gateway
To run functional end-to-end tests with a full multi-cluster deployment:
Different types of deployments can be configured with
make e2e using=helm,globalnet
The cable driver used to connect clusters can also be selected with
make e2e using=vxlan
In order to deploy clusters with OVN Kubernetes, the following command can be used:
make e2e using=ovn
Makefile.inc for the currently-supported
Additional Ginkgo flags can be passed using the
For example, a subset of tests can be selected with Ginkgo’s
make e2e TEST_ARGS='--ginkgo.focus=dataplane'
Alternatively, it’s possible to skip test(s) using Ginkgo’s
make e2e TEST_ARGS='--ginkgo.skip=dataplane'
To create a multi-cluster deployment and install Submariner but not run tests:
To create a multi-cluster deployment without Submariner:
To clean up a multi-cluster deployment from one of the previous commands:
To jump into a shell in Submariner’s standard development environment: