Skip to content

Commit 7138c23

Browse files
committed
Consolidate Metal3 Contributing guide in community repo
This is the consolidation of Contributing guide where generic contributing guidelines are maintained in the community repo and individual repos only contain repo-specific information. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
1 parent 3197864 commit 7138c23

1 file changed

Lines changed: 28 additions & 244 deletions

File tree

CONTRIBUTING.md

Lines changed: 28 additions & 244 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,52 @@
1-
# How to Contribute
1+
# How to Contribute to Baremetal Operator
22

3-
Metal3 projects are [Apache 2.0 licensed](LICENSE) and accept contributions via
4-
GitHub pull requests.
3+
> **Note**: Please read the [common Metal3 contributing guidelines](https://github.com/metal3-io/community/blob/main/CONTRIBUTING.md)
4+
> first. This document contains Baremetal Operator specific information.
55
66
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
77
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
88

9-
- [Certificate of Origin](#certificate-of-origin)
10-
- [Git commit Sign-off](#git-commit-sign-off)
11-
- [Finding Things That Need Help](#finding-things-that-need-help)
129
- [Versioning](#versioning)
1310
- [Codebase](#codebase)
14-
- [Backporting](#backporting)
1511
- [Branches](#branches)
16-
- [CI Support and Branch Maintenance](#ci-support-and-branch-maintenance)
17-
- [Contributing a Patch](#contributing-a-patch)
18-
- [Backporting a Patch](#backporting-a-patch)
19-
- [Breaking Changes](#breaking-changes)
20-
- [Merge Approval](#merge-approval)
21-
- [Google Doc Viewing Permissions](#google-doc-viewing-permissions)
22-
- [Issue and Pull Request Management](#issue-and-pull-request-management)
23-
- [Commands and Workflow](#commands-and-workflow)
12+
- [Maintenance and Guarantees](#maintenance-and-guarantees)
13+
- [Backporting Policy](#backporting-policy)
2414
- [Release Process](#release-process)
2515
- [Exact Steps](#exact-steps)
2616

2717
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2818

29-
## Certificate of Origin
30-
31-
By contributing to this project you agree to the Developer Certificate of
32-
Origin (DCO). This document was created by the Linux Kernel community and is a
33-
simple statement that you, as a contributor, have the legal right to make the
34-
contribution. See the [DCO](DCO) file for details.
35-
36-
### Git commit Sign-off
37-
38-
Commit message should contain signed off section with full name and email. For example:
39-
40-
```text
41-
Signed-off-by: John Doe <jdoe@example.com>
42-
```
43-
44-
When making commits, include the `-s` flag and `Signed-off-by` section
45-
will be automatically added to your commit message. If you want GPG
46-
signing too, add the `-S` flag alongside `-s`.
47-
48-
```bash
49-
# Signing off commit
50-
git commit -s
51-
52-
# Signing off commit and also additional signing with GPG
53-
git commit -s -S
54-
```
55-
56-
## Finding Things That Need Help
57-
58-
If you're new to the project and want to help, but don't know where to start, we
59-
have a semi-curated list of issues that
60-
should not need deep knowledge of the system. [Have a look and see if anything
61-
sounds interesting](https://github.com/metal3-io/baremetal-operator/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
62-
Alternatively, read some of the docs on other controllers and try to write your
63-
own, file and fix any/all issues that come up, including gaps in documentation!
64-
6519
## Versioning
6620

67-
### Codebase
68-
69-
Baremetal Operator doesn't follow release cadence and versioning of upstream
70-
Kubernetes semantic versioning. This codebase guarantees the following:
21+
See the [common versioning and release semantics](https://github.com/metal3-io/community/blob/main/CONTRIBUTING.md#versioning-and-release-semantics)
22+
in the Metal3 community contributing guide.
7123

72-
- A (*minor*) release CAN include:
73-
- Introduction of new API versions, or new Kinds.
74-
- Compatible API changes like field additions, deprecation notices, etc.
75-
- Breaking API changes for deprecated APIs, fields, or code.
76-
- Features, promotion or removal of feature gates.
77-
- And more!
24+
**Note**: The test module and experiments do not provide any backward
25+
compatible guarantees.
7826

79-
- A (*patch*) release SHOULD only include backwards compatible set of bugfixes.
80-
81-
These guarantees extend to all code exposed in our Go Module, including
82-
*types from dependencies in public APIs*.
83-
Types and functions not in public APIs are not considered part of the guarantee.
84-
85-
#### Backporting
86-
87-
We generally do not accept PRs directly against release branches, while we might
88-
accept backports of fixes/changes already merged into the main branch.
89-
90-
We generally allow backports of the following kinds of changes to all maintained
91-
branches:
92-
93-
- Critical bug fixes, security issue fixes, or fixes for bugs without easy
94-
workarounds.
95-
- Dependency bumps for CVE (usually limited to CVE resolution; backports of
96-
non-CVE related version bumps are considered exceptions to be evaluated case by
97-
case)
98-
- Changes required to support new Kubernetes patch versions, when possible.
99-
- Changes to use the latest Go patch version to build controller images.
100-
- Changes to bump the Go minor version used to build controller images, if the
101-
Go minor version of a supported branch goes out of support (e.g. to pick up
102-
bug and CVE fixes). This has no impact on users importing Baremetal Operator
103-
as we won't modify the version in go.mod and the version in the Makefile
104-
does not affect them.
105-
- Improvements to existing docs
106-
- Improvements to the test framework
107-
108-
Like any other activity in the project, backporting a fix/change is a
109-
community-driven effort and requires that someone volunteers to own the task.
110-
In most cases, the cherry-pick bot can (and should) be used to automate
111-
opening a cherry-pick PR.
27+
### Codebase
11228

113-
We generally do not accept backports to BMO release branches that are EOL (End
114-
of life). Check the [Version support](https://github.com/metal3-io/metal3-docs/blob/main/docs/user-guide/src/version_support.md#baremetal-operator)
115-
guide for reference.
29+
Baremetal Operator doesn't follow the release cadence of upstream Kubernetes.
30+
The versioning semantics follow the common Metal3 guidelines above.
11631

11732
## Branches
11833

119-
The *main* branch is where development happens. All the latest and
120-
greatest code, including breaking changes, happens on main.
121-
122-
The *release-X.Y* branches will contain stable, backwards compatible code. On
123-
every major or minor release, a new branch will be created. It is from these
124-
branches that minor and patch releases will be tagged. In some cases, it may
125-
be necessary to open PRs for bugfixes directly against stable branches, but
126-
this should generally not be the case.
34+
See the [common branch structure guidelines](https://github.com/metal3-io/community/blob/main/CONTRIBUTING.md#branches)
35+
in the Metal3 community contributing guide.
12736

128-
### CI Support and Branch Maintenance
37+
### Maintenance and Guarantees
12938

130-
Baremetal-operator maintains the most recent release/releases for all supported
39+
Baremetal Operator maintains the most recent release/releases for all supported
13140
APIs and contract versions. Support for this section refers to CI support and
13241
the ability to backport and release patch versions;
133-
[backport policy](#backporting) is defined above.
42+
[backport policy](#backporting-policy) is defined below.
13443

13544
- The API version is determined from the GroupVersion defined in the top-level
13645
`apis/` package.
13746

13847
- The EOL date of each API Version is determined from the last release available
13948
once a new API version is published.
14049

141-
| API Version | Maintained Until |
142-
| ------------ | ------------------------------------------------------------- |
143-
| **v1alpha1** | TBD (current latest) |
144-
| **v1beta1** | Upcoming (Proposal [PR](https://github.com/metal3-io/metal3-docs/pull/332)) |
145-
14650
- For the current stable API version (v1alpha1) we support the two most recent
14751
minor releases; older minor releases are immediately unsupported when a new
14852
major/minor release is available.
@@ -156,147 +60,27 @@ the ability to backport and release patch versions;
15660
supported, we will also maintain test coverage for v0.2 for one additional
15761
release cycle. When v0.5 is released, tests for v0.2 will be removed.
15862

159-
**Note**: Currently, BMO release branches are tested with CAPM3 integration/e2e
160-
tests, so dropping a test for BMO release version is dependant on CAPM3
161-
release. As such, we might test a BMO release until we drop the test for
162-
CAPM3. Once BMO e2e tests take over, we can follow the above policy for
163-
dropping tests.
164-
165-
| Minor Release | API Version | Maintained Until |
166-
| ------------- | ------------ | --------------------------------------------- |
167-
| v0.10.x | **v1alpha1** | when v0.12.0 will be released |
168-
| v0.9.x | **v1alpha1** | when v0.11.0 will be released |
169-
| v0.8.x | **v1alpha1** | EOL since 2025-04-29 |
170-
| v0.7.x | **v1alpha1** | EOL since 2024-12-19 |
171-
| v0.6.x | **v1alpha1** | EOL since 2024-09-03 |
172-
| v0.5.x | **v1alpha1** | EOL since 2024-09-03 |
173-
| v0.4.x | **v1alpha1** | EOL since 2024-04-17 |
174-
| v0.3.x | **v1alpha1** | EOL since 2024-01-08 |
175-
| v0.2.x | **v1alpha1** | EOL since 2023-08-30 (*) |
176-
| v0.1.x | **v1alpha1** | EOL since 2023-04-26 (*) |
177-
178-
(*) Previous support policy applies, older minor releases were immediately
179-
unsupported when a new major/minor release was available
63+
(*) Previous maintenance policy applies, older minor releases were immediately
64+
out of maintenance when a new major/minor release was available
18065

18166
- Exceptions can be filed with maintainers and taken into consideration on a
18267
case-by-case basis.
18368

184-
## Contributing a Patch
185-
186-
1. If you haven't already done so, sign a Contributor License Agreement (see
187-
details [here](https://github.com/kubernetes/community/blob/master/CLA.md)).
188-
1. Fork the desired repo, develop and test your code changes.
189-
1. Submit a pull request.
69+
## Backporting Policy
19070

191-
All code PR should be labeled with one of
71+
See the [common backporting guidelines](https://github.com/metal3-io/community/blob/main/CONTRIBUTING.md#backporting)
72+
in the Metal3 community contributing guide.
19273

193-
- ⚠️ (`:warning:`, major or breaking changes)
194-
- ✨ (`:sparkles:`, feature additions)
195-
- 🐛 (`:bug:`, patch and bugfixes)
196-
- 📖 (`:book:`, documentation or proposals)
197-
- 🌱 (`:seedling:`, minor or other)
74+
Additionally, for Baremetal Operator:
19875

199-
Individual commits should not be tagged separately, but will generally be
200-
assumed to match the PR. For instance, if you have a bugfix in with
201-
a breaking change, it's generally encouraged to submit the bugfix
202-
separately, but if you must put them in one PR, mark the commit
203-
separately.
204-
205-
All changes must be code reviewed. Coding conventions and standards are
206-
explained in the official [developer
207-
docs](https://github.com/kubernetes/community/tree/master/contributors/devel).
208-
Expect reviewers to request that you
209-
avoid common [go style
210-
mistakes](https://github.com/golang/go/wiki/CodeReviewComments) in your PRs.
211-
212-
## Backporting a Patch
213-
214-
Baremetal Operator will maintain older versions through `release-X.Y` branches.
215-
We accept backports of bug fixes to the most recent
216-
release branch. For example, if the most recent branch is `release-0.3`, and the
217-
`main` branch is under active
218-
development for v0.4.0, a bug fix that merged to `main` that also affects
219-
`v0.3.x` may be considered for backporting
220-
to `release-0.3`. We generally do not accept PRs against older release branches.
221-
222-
## Breaking Changes
223-
224-
Breaking changes are generally allowed in the `main` branch.
225-
226-
There may be times, however, when `main` is closed for breaking changes. This
227-
is likely to happen as we are close to release a new minor version.
228-
229-
Breaking changes are not allowed in release branches, as these represent minor
230-
versions that have already been released.
231-
These versions have consumers who expect the APIs, behaviors, etc. to remain
232-
stable during the life time of the patch stream for the minor release.
233-
234-
Examples of breaking changes include:
235-
236-
- Removing or renaming a field in a CRD
237-
- Removing or renaming a CRD
238-
- Removing or renaming an exported constant, variable, type, or function
239-
- Updating the version of critical libraries such as controller-runtime,
240-
client-go, apimachinery, etc. (patch versions of these libraries are not
241-
considered as breaking change)
242-
- Some version updates may be acceptable, for picking up bug fixes, but
243-
maintainers must exercise caution when reviewing.
244-
245-
There is possibility to have exceptions where breaking changes are allowed in
246-
release branches. These are at the discretion of the project's maintainers, and
247-
must be carefully considered before merging. An example of an allowed
248-
breaking change might be a fix for a behavioral bug that was released in an
249-
initial minor version (such as `v0.3.0`).
250-
251-
### Merge Approval
252-
253-
Please see the [Kubernetes community document on pull
254-
requests](https://git.k8s.io/community/contributors/guide/pull-requests.md) for
255-
more information about the merge process.
256-
257-
### Google Doc Viewing Permissions
258-
259-
To gain viewing permissions to google docs in this project, please join the
260-
[metal3-dev](https://groups.google.com/forum/#!forum/metal3-dev) google
261-
group.
262-
263-
### Issue and Pull Request Management
264-
265-
Anyone may comment on issues and submit reviews for pull requests. However, in
266-
order to be assigned an issue or pull request, you must be a member of the
267-
[Metal3-io organization](https://github.com/metal3-io) GitHub organization.
268-
269-
Metal3 maintainers can assign you an issue or pull request by leaving a
270-
`/assign <your Github ID>` comment on the issue or pull request.
271-
272-
### Commands and Workflow
273-
274-
Baremetal Operator follows the standard Kubernetes workflow: any PR
275-
needs `lgtm` and `approved` labels, and PRs must pass the tests before being
276-
merged. See
277-
[the contributor docs](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#the-testing-and-merge-workflow)
278-
for more info.
279-
280-
We use the same priority and kind labels as Kubernetes. See the labels
281-
tab in GitHub for the full list.
282-
283-
The standard Kubernetes comment commands should work in
284-
Baremetal Operator. See [Prow](https://prow.apps.test.metal3.io/command-help)
285-
for a command reference.
76+
- We generally do not accept backports to BMO release branches that are EOL.
77+
Check the [Version support](https://github.com/metal3-io/metal3-docs/blob/main/docs/user-guide/src/version_support.md#baremetal-operator)
78+
guide for reference.
28679

28780
## Release Process
28881

289-
Minor and patch releases are generally done immediately after a feature or
290-
bugfix is landed, or sometimes a series of features tied together.
291-
292-
Minor releases will only be tagged on the *most recent* major release
293-
branch, except in exceptional circumstances. Patches will be backported
294-
to maintained stable versions, as needed.
295-
296-
Major releases will be done shortly after a breaking change is merged -- once
297-
a breaking change is merged, the next release *must* be a major revision.
298-
We don't intend to have a lot of these, so we may put off merging breaking
299-
PRs until a later date.
82+
See the [common release process guidelines](https://github.com/metal3-io/community/blob/main/CONTRIBUTING.md#release-process)
83+
in the Metal3 community contributing guide.
30084

30185
### Exact Steps
30286

0 commit comments

Comments
 (0)