If you would like to contribute to Multicloud-Operators projects, this guide will help you get started.
All Multicloud-Operators repositories 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.
- Submit an issue describing your proposed change to the repo in question.
- The repo owners will respond to your issue promptly.
- Fork the desired repository, develop and test your code changes.
- Commit your changes with DCO to the forked repository
- Submit a pull request to main repository
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.
Multcloud-Operators projects are built with following tools, use following links to get them installed in your env.
Kubernetes:
- Version 1.13+. Use following link to find an environment or setup one.
Build:
Lint:
- hadolint
- shellcheck
- yamllint
- helm client
- golangci-lint
- autopep8
- mdl
- awesome_bot
- sass-lint
- tslint
- prototool
- goimports - Run
go get -v golang.org/x/tools/cmd/goimports
to install
Test:
Set following variables to build your local image
GO111MODULE=on
to enable go moduleGIT_HOST=<your personal org>
override the org from main repo. e.g:github.com/<your_account>
BUILD_LOCALLY=1
to build locallyREGISTRY=<your registry>
to set registry of your image, default isquay.io/multicloudlab
IMG=<you image name>
to set your image name, tags are generated automatically, default name ismulticloud-operators-subscription
Use make
to lint, test, and build your images locally. Official image built from master branch is pushed to quay.io/multicloudlab/multicloud-operators-subscription.
Multicloud-Operators repositories follow general operator-sdk practice to run the operator.
Before running the operator, required CRDs must be registered with Kubernetes apiserver:
% kubectl apply -f deploy/crds
Once this is done, there are 2 ways to run the operator
- As a go program in development environment outside a Kubernetes cluster
- As a Deployment inside a Kubernetes cluster
Use following operator-sdk command to launch operator locally.
export OPERATOR_NAME=multicloud-operators-subscription
% operator-sdk up local
Use the following kubectl command to launch operator as a deployment in a Kubernetes cluster.
% kubectl deploy -f deploy
Verify the deployment and pods with following command:
% kubectl get deploy,pods -l name=multicloud-operators-subscription
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/multicloud-operators-subscription 1/1 1 1 15m
NAME READY STATUS RESTARTS AGE
pod/multicloud-operators-subscription-78c9874dff-f64pg 1/1 Running 0 15m