Welcome to MPI Operator's contributing guide!
If you haven't done so, please follow the instructions here to fork and clone the repository, and then configure the remote repository for the repository you just cloned locally. Note that you'd probably want to clone your forked repository to be under your GOPATH
, for example:
mkdir -p ${GOPATH}/src/github.com/kubeflow
cd ${GOPATH}/src/github.com/kubeflow
git clone https://github.com/${GITHUB_USER}/mpi-operator.git
We use Go v1.13+ for development and use Go Modules to download and install the dependencies.
You can execute all the unit tests via go test ./...
.
We use golangci-lint to check issues on code style. Please also check out this wiki for some additional instructions on code review.
You have to build the image and deploy the standalone YAMLs in a cluster.
CONTROLLER_VERSION=v1 RELEASE_VERSION=latest make images
kubectl apply -k manifests/overlays/standalone
If you need to use a different registry, you can do:
IMAGE_NAME=example.com/mpi-operator CONTROLLER_VERSION=v1 RELEASE_VERSION=latest make images
Next, modify the line newName
in manifests/overlays/standalone/kustomization.yaml
to match the image name. After pushing the image to the registry, you can apply
the YAMLs the same way as before.
To look at the controller's logs, you can do:
kubectl logs -n mpi-operator -f deployment/mpi-operator