Development
Installation
Prerequisites
Download Operator SDK
Go to the operator-sdk repo and follow the fork guide to fork and set up a local repository.
Build the Operator SDK CLI
Build the Operator SDK CLI operator-sdk
binary:
make install
Testing
See the testing and documentation guides for more information.
Releasing
See the release guide for more information.
Continuous Integration (CI)
The operator-sdk repo uses Travis CI to test each pull request and build images for both master commits and releases. You can alter these processes by modifying this .travis.yml config file.
Testing builds with new architectures
Follow these steps to execute the Travis Deploy
stage against your branch to demonstrate that the merge build will complete as expected.
- Enable Travis in your fork repository. See this guide for more information.
- Create public image repos for each image built by
make image-build
; make sure the registry used supports multi-arch images, like quay.io.- For each image type, you need one repo for the manifest list and one for each architecture being tested.
- Set each image variable (that ends in
_IMAGE
, not_BASE_IMAGE
) found in the Makefile as an environment variable in.travis.yml
, ex.export SCORECARD_TEST_IMAGE=<registry>/<username>/scorecard-test:latest
- Create a PR with your configuration changes to your fork, with the first commit message containing
[travis deploy]
.- This commit is only for testing on your fork’s PR. This commit/message should not be present in an operator-sdk repo PR.
- Ensure the image builds for that PR pass.
- Create a PR to the operator-sdk repo with a description containing a link to the Travis build page showing a successful deployment stage with your changes.
Generating Samples
To generate the samples run:
$ make samples
Generating the docs
To generate the CLI docs run:
$ make cli-doc
Last modified October 7, 2020: Update go version in SDK (#3987) (bfd849cc)