|
| 1 | +--- |
| 2 | +sidebar_label: Contributing |
| 3 | +sidebar_position: 3 |
| 4 | +--- |
| 5 | +# Contributing to Koordinator |
| 6 | + |
| 7 | +Welcome to Koordinator! Koordinator consists several repositories under the organization. We encourage you to help out |
| 8 | +by reporting issues, improving documentation, fixing bugs, or adding new features. |
| 9 | + |
| 10 | +Please also take a look at our code of conduct, which details how contributors are expected to conduct themselves as |
| 11 | +part of the Koordinator community. |
| 12 | + |
| 13 | +We made Koordinator open-source to empower developers to fix and extend the product to better meet their needs. Nothing |
| 14 | +thrills us more than people so passionate about the product that they're willing to spend their own time to learn the |
| 15 | +codebase and give back to the community. We created this doc, so we can support contributors in a way that doesn't |
| 16 | +sacrifice precious bandwidth that we use to serve our users and otherwise meet our community goals. |
| 17 | + |
| 18 | +## Reporting issues |
| 19 | + |
| 20 | +To be honest, we regard every user of Koordinator as a very kind contributor. After experiencing Koordinator, you may |
| 21 | +have some feedback for the project. Then feel free to open an issue. |
| 22 | + |
| 23 | +There are lots of cases when you could open an issue: |
| 24 | + |
| 25 | +- bug report |
| 26 | +- feature request |
| 27 | +- performance issues |
| 28 | +- feature proposal |
| 29 | +- feature design |
| 30 | +- help wanted |
| 31 | +- doc incomplete |
| 32 | +- test improvement |
| 33 | +- any questions on project |
| 34 | +- and so on |
| 35 | + |
| 36 | +Also we must remind that when filing a new issue, please remember to remove the sensitive data from your post. Sensitive |
| 37 | +data could be password, secret key, network locations, private business data and so on. |
| 38 | + |
| 39 | +## Code and doc contribution |
| 40 | + |
| 41 | +Every action to make Koordinator better is encouraged. On GitHub, every improvement for Koordinator could be via a PR ( |
| 42 | +short for pull request). |
| 43 | + |
| 44 | +- If you find a typo, try to fix it! |
| 45 | +- If you find a bug, try to fix it! |
| 46 | +- If you find some redundant codes, try to remove them! |
| 47 | +- If you find some test cases missing, try to add them! |
| 48 | +- If you could enhance a feature, please DO NOT hesitate! |
| 49 | +- If you find code implicit, try to add comments to make it clear! |
| 50 | +- If you find code ugly, try to refactor that! |
| 51 | +- If you can help to improve documents, it could not be better! |
| 52 | +- If you find document incorrect, just do it and fix that! |
| 53 | +- ... |
| 54 | + |
| 55 | +### Workspace Preparation |
| 56 | + |
| 57 | +To put forward a PR, we assume you have registered a GitHub ID. Then you could finish the preparation in the following |
| 58 | +steps: |
| 59 | + |
| 60 | +1. **Fork** Fork the repository you wish to work on. You just need to click the button Fork in right-left of project |
| 61 | + repository main page. Then you will end up with your repository in your GitHub username. |
| 62 | +2. **Clone** your own repository to develop locally. Use `git clone https://github.com/<your-username>/<project>.git` to |
| 63 | + clone repository to your local machine. Then you can create new branches to finish the change you wish to make. |
| 64 | +3. **Set remote** upstream to be `https://github.com/koordinator-sh/<project>.git` using the following two commands: |
| 65 | + |
| 66 | +```bash |
| 67 | +git remote add upstream https://github.com/koordinator-sh/<project>.git |
| 68 | +git remote set-url --push upstream no-pushing |
| 69 | +``` |
| 70 | + |
| 71 | +Adding this, we can easily synchronize local branches with upstream branches. |
| 72 | + |
| 73 | +4. **Create a branch** to add a new feature or fix issues |
| 74 | + |
| 75 | +Update local working directory: |
| 76 | + |
| 77 | +```bash |
| 78 | +cd <project> |
| 79 | +git fetch upstream |
| 80 | +git checkout main |
| 81 | +git rebase upstream/main |
| 82 | +``` |
| 83 | + |
| 84 | +Create a new branch: |
| 85 | + |
| 86 | +```bash |
| 87 | +git checkout -b <new-branch> |
| 88 | +``` |
| 89 | + |
| 90 | +Make any change on the new-branch then build and test your codes. |
| 91 | + |
| 92 | +### PR Description |
| 93 | + |
| 94 | +PR is the only way to make change to Koordinator project files. To help reviewers better get your purpose, PR |
| 95 | +description could not be too detailed. We encourage contributors to follow |
| 96 | +the [PR template](https://github.com/koordinator-sh/koordinator/blob/main/.github/pull_request_template.md) to finish the pull request. |
| 97 | + |
| 98 | +### Developing Environment |
| 99 | + |
| 100 | +As a contributor, if you want to make any contribution to Koordinator project, we should reach an agreement on the |
| 101 | +version of tools used in the development environment. Here are some dependents with specific version: |
| 102 | + |
| 103 | +- Golang : v1.17+ |
| 104 | +- Kubernetes: v1.20+ |
| 105 | + |
| 106 | +### Developing guide |
| 107 | + |
| 108 | +There's a `Makefile` in the root folder which describes the options to build and install. Here are some common ones: |
| 109 | + |
| 110 | +```bash |
| 111 | +# Generate code (e.g., apis, clientset, informers) and manifests (e.g., CRD, RBAC YAML files) |
| 112 | +make generate manifests |
| 113 | + |
| 114 | +# Build the koord-manager and koordlet binary |
| 115 | +make build |
| 116 | + |
| 117 | +# Run the unit tests |
| 118 | +make test |
| 119 | +``` |
| 120 | + |
| 121 | +### Proposals |
| 122 | + |
| 123 | +If you are going to contribute a feature with new API or needs significant effort, please submit a proposal |
| 124 | +in [./docs/proposals/](https://github.com/koordinator-sh/koordinator/tree/main/docs/proposals) first. |
| 125 | + |
| 126 | +## Engage to help anything |
| 127 | + |
| 128 | +We choose GitHub as the primary place for Koordinator to collaborate. So the latest updates of Koordinator are always |
| 129 | +here. Although contributions via PR is an explicit way to help, we still call for any other ways. |
| 130 | + |
| 131 | +- reply to other's issues if you could; |
| 132 | +- help solve other user's problems; |
| 133 | +- help review other's PR design; |
| 134 | +- help review other's codes in PR; |
| 135 | +- discuss about Koordinator to make things clearer; |
| 136 | +- advocate Koordinator technology beyond GitHub; |
| 137 | +- write blogs on Koordinator and so on. |
| 138 | + |
| 139 | +In a word, **ANY HELP IS CONTRIBUTION**. |
| 140 | + |
| 141 | +## Joining the community |
| 142 | + |
| 143 | +Follow these instructions if you want to: |
| 144 | + |
| 145 | +- Become a member of the Koordinator GitHub org (see below) |
| 146 | +- Become part of the Koordinator build cop or release teams |
| 147 | +- Be recognized as an individual or organization contributing to Koordinator |
| 148 | + |
| 149 | +### Joining the Koordinator GitHub Org |
| 150 | + |
| 151 | +Before asking to join the community, we ask that you first make a small number of contributions to demonstrate your |
| 152 | +intent to continue contributing to Koordinator. |
| 153 | + |
| 154 | +- **Note**: Anyone can contribute to Koordinator, adding yourself as a member in the organization is not a mandatory |
| 155 | + step. |
| 156 | + |
| 157 | +There are a number of ways to contribute to Koordinator: |
| 158 | + |
| 159 | +- Submit PRs |
| 160 | +- File issues reporting bugs or providing feedback |
| 161 | +- Answer questions on Slack or GitHub issues |
| 162 | + |
| 163 | +- **Note**: This only counts GitHub related ways of contributing |
| 164 | + |
| 165 | +When you are ready to join |
| 166 | + |
| 167 | +- [Open an issue](https://github.com/koordinator-sh/koordinator/issues/new?assignees=&labels=area%2Fgithub-membership&template=membership.yml&title=REQUEST%3A+New+membership+for+<your-GH-handle>) |
| 168 | + against the **koordinator-sh/koordinator** repo |
| 169 | +- Make sure that the list of contributions included is representative of your work on the project. |
| 170 | +- Mention 2 existing reviewers who are sponsoring your membership. |
| 171 | +- After the request is approved, an admin will send you an invitation. |
| 172 | + - This is a manual process that's generally run a couple of times a week. |
| 173 | + - If a week passes without receiving an invitation reach out on DingTalk or Slack. |
0 commit comments