Skip to content

Latest commit

 

History

History
109 lines (71 loc) · 4.35 KB

CONTRIBUTING.md

File metadata and controls

109 lines (71 loc) · 4.35 KB

Table of Contents generated with DocToc

Contributing guidelines

Developer Certificate of Origin

This repository built with probot that enforces the Developer Certificate of Origin (DCO) on Pull Requests. It requires all commit messages to contain the Signed-off-by line with an email address that matches the commit author.

Contributing A Patch

  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 code changes.
  4. Commit your changes with DCO
  5. Submit a pull request.

Issue and Pull Request Management

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 IBM 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.

Developing

Pre-requisite

  1. operator-sdk CLI v1.23.0 or above

Version bump

  1. Edit the PREV_VERSION and VERSION values in the Makefile.

  2. Edit the image tags in manager.yaml.

  3. Edit the image tags in base csv.

  4. Re-generate the bundle.

    make bundle
    
  5. Verify CSV has all the edits that were made in previous steps.

Testing on Open Shift cluster

Pre-requisites

  1. operator-sdk CLI v1.23.0 or above

Testing bundle with OLM

A bundle is a packaging format for the operator, which mainly consists of the CSV and CRDs. Bundles are understood by OLM. The operator-sdk CLI has the capability to create everything necessary to run this bundle on the cluster.

Running the bundle involves ephemerally creating all the necessary OLM objects to ultimately have the operator's deployment running, such as temporary CatalogSource, OperatorGroup, Subscription, etc.

This type of testing is as close as possible to how IBM Foundational services installs ibm-cert-manager-operator without creating a complete IBM Foundational services' CatalogSource and using ODLM.

  1. Verify you can build and push the operator's image to a registry. Check the REGISTRY variable in Makefile to see what is the default. Recommended to use your own personal registry that your Open Shift cluster has access to.

    make push-image-amd64
    
    
  2. Temporarily edit the image field in manager.yaml file to be the operator image you pushed in step 1.

  3. Verify you can generate the CSV in bundle/. The image field in the CSV should be the image you pushed in step 1.

    make bundle
    
  4. Verify you can build the image for the operator bundle.

    make bundle-build
    
  5. Push the bundle up to a registry. Check the REGISTRY variable in Makefile to see what is the default. Recommended to use your own personal registry that your Open Shift cluster has access to.

    make bundle-push
    
  6. Use the built-in operator-sdk feature to run the bundle

    make bundle-run
    
  7. Verify operator is running, and you can create the operands by creating a new CertManagerConfig object

  8. Revert the image change in manager.yaml file, and re-generate the bundle before opening PR

    make bundle
    

Pre-check before submitting a PR