- Contributing guidelines
All contributions to the repository must be submitted under the terms of the Apache Public License 2.0.
By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the DCO file for details.
You must sign off your commit to state that you certify the DCO. To certify your commit for DCO, add a line like the following at the end of your commit message:
Signed-off-by: John Smith <john@example.com>
This can be done with the --signoff
option to git commit
. See the Git documentation for details.
- Submit an issue describing your proposed change to the repo in question.
- The repo owners will respond to your issue promptly.
- Fork the desired repo, develop and test your changes (see Development and Testing)
- Submit a pull request.
Anyone may comment on issues and submit reviews for pull requests. However, in order to be assigned an issue or pull request, you must be a member of the stolostron GitHub organization.
Repo maintainers can assign you an issue or pull request by leaving a /assign <your Github ID>
comment on the issue
or pull request.
Anyone may submit a pull request, although in order to ensure that the pull request can be responded to properly, link the associated issue in the PR. To have a pull request merged, it will require approval from a repository owner.
We request that all PRs which contribute new code into the repo also contain their associated unit and function tests.
After your PR is ready to commit, please run following commands to check your code.
make test # Run unit tests
Make sure your code build passed.
make manifests # Regenerate manifests if necessary
make docker-build # Ensure build succeeds
# or
make podman-build
This approach only tests MultiClusterHub Operator functionality (not the functionality of Open Cluster Management sub-components).
-
Confirm the following are installed and configured on your local machine:
docker
orpodman
go
(version 1.22.4 minimum)python3
make
-
oc login
into an OCP cluster. See Requirements and recommendations for supported cluster sizes. -
Fork the
multiclusterhub-operator
GitHub repository -
Export the following environment variables:
export MOCK_IMAGE_REGISTRY=<some-public-image-repository>
export HUB_IMAGE_REGISTRY=<some-public-image-repository>
This environment variable correlate with the image you'll need to build and push to public image repositories:
HUB_IMAGE_REGISTRY
correlates to themulticlusterhub-operator
image, which is built from themulticlusterhub-operator
codebase. The resulting image will be pushed to$HUB_IMAGE_REGISTRY/multiclusterhub-operator
These images are assumed to be public to eliminate any requirement for pull secrets.
- Run the following
make
commands to install themulticlusterhub-operator
with a "mock" component image.
make prep-mock-install
... builds and pushes the mock image and preps the image manifest to use the freshly-built mock image
make mock-install
... builds and pushes the hub image, installs the multiclusterhub-operator
as a deployment, and installs other required community-available operators
make mock-cr
... creates a legitimate MultiClusterHub
Custom Resource. Note: In this Custom Resource, hub self-management is disabled (disableHubSelfManagement: true
)
- Confirm "mock" installation successful by checking the
mch
Custom Resource for aRunning
status
oc get mch
- To uninstall all Hub components, run the following:
make uninstall
- To reinstall, run through these steps again.
- Run unit tests
make unit-tests