Skip to content

Latest commit

 

History

History
124 lines (80 loc) · 4.65 KB

CONTRIBUTING.md

File metadata and controls

124 lines (80 loc) · 4.65 KB

Contributing guidelines

Contributions

All contributions to the repository must be submitted under the terms of the Apache Public License 2.0.

Certificate of Origin

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.

DCO Sign Off

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.

Issues and Pull Request Etiquette

Anyone may create issues, comment in issues, create pull requests, and submit reviews for pull requests.

In order to be assigned an issue or pull request, you must be a member of the stolostron GitHub organization.

To have a pull request merged, it will require approval from a repository owner.

Contributing Changes

  1. Submit an issue describing your proposed change to the repo in question.
  2. The repo owners will respond to your issue promptly.
  3. Fork the desired repo, develop and test your changes (see Development and Testing)
  4. Submit a pull request.

Development and Testing

Installing MultiClusterHub Operator with local code changes

This approach only tests MultiClusterHub Operator functionality (not the functionality of Open Cluster Management sub-components).

  1. Confirm the following are installed and configured on your local machine:

    • docker
    • go (version 1.17 minimum)
    • python3
    • make
  2. oc login into an OCP cluster. See Requirements and recommendations for supported cluster sizes.

  3. Fork the multiclusterhub-operator GitHub repository

  4. 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 the multiclusterhub-operator image, which is built from the multiclusterhub-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.

  5. Run the following make commands to install the multiclusterhub-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)

  6. Confirm "mock" installation successful by checking the mch Custom Resource for a Running status

    oc get mch 
  7. To uninstall all Hub components, run the following:

    make uninstall
  8. To reinstall, run through these steps again.

Automated testing of local development code

  1. Run unit tests

    make unit-tests
  2. Function test: TBD