You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+83-26Lines changed: 83 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -40,18 +40,92 @@ Before starting to work on the issue, make sure that it doesn't have a [lifecycl
40
40
Alternatively, read some of the docs on other controllers and try to write your own, file and fix any/all issues that
41
41
come up, including gaps in documentation!
42
42
43
+
## Versioning
44
+
45
+
### Codebase and Go Modules
46
+
47
+
> :warning: The project does not follow Go Modules guidelines for compatibility requirements for 1.x semver releases.
48
+
49
+
Cluster API follows upstream Kubernetes semantic versioning. With the v1 release of our codebase, we guarantee the following:
50
+
51
+
- A (*minor*) release CAN include:
52
+
- Introduction of new API versions, or new Kinds.
53
+
- Compatible API changes like field additions, deprecation notices, etc.
54
+
- Breaking API changes for deprecated APIs, fields, or code.
55
+
- Features, promotion or removal of feature gates.
56
+
- And more!
57
+
58
+
- A (*patch*) release SHOULD only include backwards compatible set of bugfixes.
59
+
60
+
These guarantees extend to all code exposed in our Go Module, including
61
+
*types from dependencies in public APIs*.
62
+
Types and functions not in public APIs are not considered part of the guarantee.
63
+
The test module, clusterctl, and experiments do not provide any backward compatible guarantees.
64
+
65
+
#### Backporting
66
+
67
+
We only accept backports of critical bugs, security issues, or bugs without easy workarounds, any
68
+
backport MUST not be breaking for either API or behavioral changes.
69
+
We generally do not accept PRs against older release branches.
70
+
71
+
### APIs
72
+
73
+
API versioning and guarantees are inspired by the [Kubernetes deprecation policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/)
74
+
and [API change guidelines](https://github.com/kubernetes/community/blob/f0eec4d19d407c13681431b3c436be67da8c448d/contributors/devel/sig-architecture/api_changes.md).
75
+
We follow the API guidelines as much as possible adapting them if necessary and on a case-by-case basis to CustomResourceDefinition.
76
+
77
+
### CLIs
78
+
79
+
Any command line interface in Cluster API (e.g. clusterctl) share the same versioning schema of the codebase.
80
+
CLI guarantees are inspired by [Kubernetes deprecation policy for CLI](https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-flag-or-cli),
81
+
however we allow breaking changes after 8 months or 2 releases (whichever is longer) from deprecation.
82
+
83
+
## Branches
84
+
85
+
Cluster API has two types of branches: the *main* branch and
86
+
*release-X* branches.
87
+
88
+
The *main* branch is where development happens. All the latest and
89
+
greatest code, including breaking changes, happens on main.
90
+
91
+
The *release-X* branches contain stable, backwards compatible code. On every
92
+
major or minor release, a new branch is created. It is from these
93
+
branches that minor and patch releases are tagged. In some cases, it may
94
+
be necessary to open PRs for bugfixes directly against stable branches, but
95
+
this should generally not be the case.
96
+
97
+
### Support and guarantees
98
+
99
+
Cluster API maintains the most recent release branch for all supported API and contract versions. Support for this section refers to the ability to backport and release patch versions.
100
+
101
+
| API Version | Branch | Supported Until |
102
+
| ------------- | ----------- | ---------- |
103
+
|**v1beta1**| release-1.0 | current stable |
104
+
|**v1alpha4**| release-0.4 | 2022-04-06 |
105
+
|**v1alpha3**| release-0.3 | 2022-02-23 |
106
+
107
+
- The API version is determined from the GroupVersion defined in the top-level `api/` package.
108
+
- The EOL date is determined from the last release available once a new API version is published.
109
+
- For each given API version only the most recent associated release branch is supported, older branches are immediately unsupported. Exceptions can be filed with maintainers and taken into consideration on a case-by-case basis.
110
+
43
111
## Contributing a Patch
44
112
45
113
1. If you haven't already done so, sign a Contributor License Agreement (see details above).
46
114
1. If working on an issue, signal other contributors that you are actively working on it using `/lifecycle active`.
47
115
1. Fork the desired repo, develop and test your code changes.
48
116
1. Submit a pull request.
49
117
1. All code PR must be labeled with one of
50
-
- ⚠️ (:warning:, major or breaking changes)
51
-
- ✨ (:sparkles:, feature additions)
52
-
- 🐛 (:bug:, patch and bugfixes)
53
-
- 📖 (:book:, documentation or proposals)
54
-
- 🌱 (:seedling:, minor or other)
118
+
- ⚠️ (`:warning:`, major or breaking changes)
119
+
- ✨ (`:sparkles:`, feature additions)
120
+
- 🐛 (`:bug:`, patch and bugfixes)
121
+
- 📖 (`:book:`, documentation or proposals)
122
+
- 🌱 (`:seedling:`, minor or other)
123
+
124
+
Individual commits should not be tagged separately, but will generally be
125
+
assumed to match the PR. For instance, if you have a bugfix in with
126
+
a breaking change, it's generally encouraged to submit the bugfix
127
+
separately, but if you must put them in one PR, mark the commit
128
+
separately.
55
129
56
130
All changes must be code reviewed. Coding conventions and standards are explained in the official [developer
57
131
docs](https://git.k8s.io/community/contributors/devel). Expect reviewers to request that you
@@ -87,7 +161,7 @@ When submitting the PR remember to label it with the 📖 (:book:) icon.
87
161
88
162
Cluster API uses [GitHub milestones](https://github.com/kubernetes-sigs/cluster-api/milestones) to track releases.
89
163
90
-
- Minor versions CAN be planned and scheduled twice in a calendar year.
164
+
- Minor versions CAN be planned and scheduled for each quarter, or sooner if necessary.
91
165
- Each minor version is preceded with one or more planning session.
92
166
- Planning consists of one or more backlog grooming meetings, roadmap amendments,
93
167
and CAEP proposal reviews.
@@ -140,8 +214,6 @@ The artifact folder contains:
140
214
141
215
In case you want to run E2E test locally, please refer to the [Testing](https://cluster-api.sigs.k8s.io/developer/testing.html#running-unit-and-integration-tests) guide. An overview over our e2e test jobs (and also all our other jobs) can be found in [Jobs](https://cluster-api.sigs.k8s.io/reference/jobs.html).
142
216
143
-
144
-
145
217
## Reviewing a Patch
146
218
147
219
## Reviews
@@ -171,21 +243,6 @@ process.
171
243
- A PR is approved by one of the project maintainers and owners after reviews.
172
244
- Approvals should be the very last action a maintainer takes on a pull request.
173
245
174
-
## Backporting a Patch
175
-
176
-
Cluster API maintains older versions through `release-X.Y` branches.
177
-
We accept backports of bug fixes and non breaking features to the most recent release branch.
178
-
Backports MUST not be breaking for both API and behavioral changes.
179
-
We generally do not accept PRs against older release branches.
180
-
181
-
As an example:
182
-
183
-
Let's assume that the most recent release branch is `release-0.3`
184
-
and the main branch is under active development for the next release.
185
-
A pull request that has been merged in the main branch can be backported to the `release-0.3`
186
-
if at least one maintainer approves the cherry pick, or asks the PR's author to backport.
187
-
188
-
189
246
## Features and bugs
190
247
191
248
Open [issues](https://github.com/kubernetes-sigs/cluster-api/issues/new/choose) to report bugs, or minor features.
@@ -194,7 +251,7 @@ For big feature, API and contract amendments, we follow the CAEP process as outl
194
251
195
252
## Experiments
196
253
197
-
Proof of concepts, code experiments, or other initiatives can live under the `exp` folder and behind a feature gate.
254
+
Proof of concepts, code experiments, or other initiatives can live under the `exp` folder or behind a feature gate.
198
255
199
256
- Experiments SHOULD not modify any of the publicly exposed APIs (e.g. CRDs).
200
257
- Experiments SHOULD not modify any existing CRD types outside of the experimental API group(s).
@@ -272,7 +329,7 @@ Optional fields have the following properties:
272
329
* Note: This doesn't apply to map or slice types as they are assignable to `nil`.
273
330
274
331
#### Example
275
-
332
+
276
333
When using ClusterClass, the semantic difference is important when you have a field in a template which will
277
334
have instance-specific different values in derived objects. Because in this case it's possible to set the field to `nil`
278
335
in the template and then the value can be set in derived objects without being overwritten by the cluster topology controller.
@@ -295,7 +352,7 @@ in the template and then the value can be set in derived objects without being o
295
352
}
296
353
```
297
354
298
-
* Top-level fields in `status` must always have the `+optional` annotation. If we want the field to be always visible even if it
355
+
* Top-level fields in `status` must always have the `+optional` annotation. If we want the field to be always visible even if it
299
356
has the zero value, it must **not** have the `omitempty` JSON tag, e.g.:
300
357
* Replica counters like `availableReplicas` in the `MachineDeployment`
301
358
* Flags expressing progress in the object lifecycle like `infrastructureReady` in `Machine`
0 commit comments