-
Notifications
You must be signed in to change notification settings - Fork 5.2k
First draft of a document outlining the api review process #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Description of your API | ||
|
||
Initial API version: v1alpha1 | ||
|
||
## Owners | ||
|
||
SIG owner: list of SIG that will own the design, implementation, and support | ||
Individual owners: list of individual GitHub users that will own the design, implementation, and support | ||
|
||
## Abstract | ||
|
||
4-8 sentence description of the problem and solution. Bullet points welcome. | ||
|
||
## Motivation | ||
|
||
4-8 sentence of the current state and why it is insufficient. | ||
|
||
## Use cases | ||
|
||
Bullet point list of use cases this proposal is meant to address. | ||
|
||
- As a cluster administrator... | ||
- As a application developer... | ||
- As a Kubernetes extension developer... | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An entirely new API should have a requirements section (at least functional ones, ideally non-functional also). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
## Requirements | ||
|
||
Bullet point list of new API requirements. Requirements will in part be driven by use | ||
cases, but may have additional engineering or interoperability requirements: | ||
|
||
- User requirement | ||
- Engineering requirement | ||
- Interoperability requirement | ||
|
||
## Overview subsequent versions | ||
|
||
Subsequent versions will require their own API proposals, however it is important to include | ||
the plans for them here to provide a broader picture. | ||
|
||
### Beta | ||
|
||
*Use cases* | ||
|
||
- Use cases for transitioning to Beta | ||
|
||
*Requirements* | ||
|
||
- Additional requirements for transitioning to Beta | ||
|
||
### GA | ||
|
||
*Use cases* | ||
|
||
- Use cases for transitioning to Beta | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/Beta/GA/ Do we really need beta & GA requirements up front? If people knew what they needed to do they would just do it to begin with. |
||
|
||
*Requirements* | ||
|
||
- Additional requirements for transitioning to Beta | ||
|
||
## Dependencies and deadlines | ||
|
||
List of features that will depend on these changes. | ||
|
||
List of features that these changes will depend upon. | ||
|
||
**Include any deadlines that are related.** e.g. another feature depends on this and it is slated for 1.x. | ||
|
||
## Proposed changes for new types or existing types | ||
|
||
Declare the proposed Group / Version / Kind for any new types created as part of this proposal. | ||
|
||
Declare any new fields for existing types and their version. Will the fields be added as first class fields or | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the bit about annotations, I don't want to present that as a first-class option. |
||
as annotations? | ||
|
||
Describe how any new types or fields will be used by the end user. Include sample yaml config and full | ||
walkthrough examples of 1 or more usecases. | ||
|
||
### Defaulting | ||
|
||
Describe defaulting that will be done | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be covered by the comments in the PR adding the types, no? Same with validation below. I think we shouldn't make people describe in prose things that are best written in the documentation. (so, checking these things should be in the instructions for api reviewers.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you suggesting the defaulting and validation review be done separately in a second PR, or that the proposal PR include a link to a types.go PR, or that defaulting / validation may be reviewed by a separate group of folks? |
||
|
||
### Validation | ||
|
||
Describe validation the will be done | ||
|
||
### Patching lists - strategic merge keys | ||
|
||
For any list fields, describe whether they will be replaced when patched or merged. If merged, | ||
describe the merge key that will be used. | ||
|
||
**mergeKeys must be unique and required for all elements in the list!** Consequences of using a | ||
non-unique or optional merge key may be severe. | ||
|
||
### Controllers | ||
|
||
Describe any controllers that will be added or updated. | ||
|
||
### Subresources | ||
|
||
Describe any subresources that will be added. | ||
|
||
## Mandatory API pre-flight check list | ||
|
||
The following items must be considered and explained when adding or changing and API. | ||
|
||
### API convention deviations | ||
|
||
List and justify any deviations from [API conventions]. *None* is acceptable if | ||
there are no deviations. | ||
|
||
### Impact on backwards / forwards compatibility | ||
|
||
Describe any impact on backwards / forwards [compatibility]. | ||
|
||
Known future incompatibility risks and mitigation. | ||
|
||
### Security, PII and authz | ||
|
||
Describe any security concerns or PII that is managed by the API. Describe | ||
any special considerations that must be made for authentication or | ||
authorization. | ||
|
||
### Cli and client library considerations. | ||
|
||
Describe any interactions with the cli or client libraries. | ||
|
||
Is functionality in this API already present in the cli? If so, was is the interaction and | ||
path forward? | ||
|
||
Is server side garbage collection needed / enabled? | ||
|
||
## Alternatives considered | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to me that some of the items in this list really belong in a proposal or design doc. I would consider focusing this doc on things that are really unique to the api, as it is feeling a little heavyweight. |
||
|
||
List alternative solutions to the use cases. Include an analysis of any of | ||
the following that apply. | ||
|
||
- Client side solutions | ||
- Existing APIs or solutions that are similar | ||
- Existing workarounds - include solutions that compose existing APIs | ||
- Using ThirdPartyResources | ||
|
||
[API conventions]: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md | ||
[compatibility]: https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md#on-compatibility |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Description of your API | ||
|
||
## Abstract | ||
|
||
4-8 sentence description of the problem and solution. Bullet points welcome. | ||
|
||
## Motivation | ||
|
||
4-8 sentence of the current state and why it is insufficient. | ||
|
||
## Use cases | ||
|
||
Bullet point list of use cases this proposal is meant to address | ||
|
||
## Dependencies and deadlines | ||
|
||
List of features that will depend on these changes. | ||
|
||
List of features that these changes will depend upon. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
# Guidelines for contributing API changes | ||
|
||
## Overview | ||
|
||
Modifications to the core Kubernetes API have a material impact on the Kubernetes project, and | ||
undergo thorough review and discussion before they are accepted. This document outlines the | ||
review process and what is expected of API contributors. | ||
|
||
## Process overview | ||
|
||
*Proposal process* | ||
|
||
All API changes require a formal proposal to be made, reviewed and accepted. The proposal will be | ||
considered accepted once the proposal PR has been merged. | ||
|
||
*Feature process* | ||
|
||
All API changes require an issue to be filed in the [kubernetes/features] repo. The | ||
issue will be used by release coordinators to track which features are slated for a | ||
release milestone. | ||
|
||
## Changes that qualify as API changes | ||
|
||
All changes to existing or new APIs are subject to the process outlined in this document. | ||
|
||
The following qualify as API changes: | ||
|
||
- Adding, removing, or modifying API types (e.g. through types.go, or by defining a new annotation) | ||
- Changing the version of an existing type (e.g. v1alpha1 to v1beta1) | ||
- Adding, removing, or modifying subresources for existing types. (e.g. /scale) | ||
- Material changes to how fields on existing types are interpreted / used - including, but not limited to | ||
validation and defaulting of the fields. | ||
|
||
The following on their own do not qualify as API changes, but should follow the process defined by the related | ||
[special interest groups]. | ||
|
||
- Adding or changing a command or flag to kubectl: See [contributing to SIG cli] | ||
- Building new command line tools: See [contributing to SIG cli] | ||
- Adding or changing a flag to kubelet: sig-node | ||
- Adding or changing a flag to apiserver: sig-api-machinery | ||
- Refactoring code | ||
- Building extensions | ||
|
||
## Life of an API change | ||
|
||
1. Start a discussion | ||
2. Write a short description | ||
3. Write a detailed design proposal in the [kubernetes/community] repo | ||
4. Schedule a design review | ||
5. File an issue in the [kubernetes/features] repo that links to the proposal | ||
6. Implement the proposal in the [kubernetes/kubernetes] repo | ||
7. Write user facing documentation on [kubernetes/kubernetes.github.io] | ||
|
||
### Start a discussion. | ||
|
||
Expected time for decision: 1-4 weeks (depending on the SIG and feature) | ||
|
||
Start a discussion with the relevant [special interest groups] that will [own] the changes. | ||
Depending on the SIG, this may be done via SIG meetings, email groups, slack channel, etc. | ||
|
||
### Write a short description | ||
|
||
Expected time for decision: 2 weeks | ||
|
||
Write a short description of the API changes by copying the [design summary template] | ||
into a new issue, and [@mention] @kubernetes/api-reviewers and the owning SIG reviewers | ||
group. | ||
|
||
Determine whether @kubernetes/api-reviewers is willing to accept a design proposal | ||
for your feature. The answer could be "no, we don't want to solve this problem this way." | ||
or "no, this is something we want, but cannot commit the resources to reviewing it this release." | ||
|
||
### Write a detailed design proposal | ||
|
||
Expected time for initial feedback: 3-6 weeks | ||
|
||
Write a detailed design proposal PR using the [design proposal PR template]. [@mention] | ||
@kubernetes/api-reviewers and the appropriate SIGs on the PR and reference the original | ||
issue in the PR description. | ||
|
||
### Schedule a design review | ||
|
||
Expected time for next slot: 4-8 weeks | ||
|
||
Schedule a time for your design to be reviewed. | ||
|
||
See the current list of [design approvers](https://github.com/orgs/kubernetes/teams/api-approvers) | ||
|
||
**Note**: these are the current reviewers, we are still figuring out how to | ||
add/remove people to this list. For more information, see the | ||
[governance discussion](https://groups.google.com/forum/#!topic/kubernetes-dev/4e8WOnMvZC0) | ||
|
||
### Implement the proposal | ||
|
||
Once the proposal has been accepted an merged, you can begin implementing the solution. | ||
|
||
## How to escalate | ||
|
||
Escalation should be done through the owning SIG. If you need help getting attention, reach out to your | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you enumerate each SIG and the APIs they own? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do you think is the proper place for this to live? I could create a document, but it will be constantly stale. WDYT of comments in the code that would could There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively, if SIGs own whole api groups, it would be more manageable to add them to the table that follows. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know where it should live. @bgrant0607 made some reference to an effort to map code to owners. |
||
SIG. | ||
|
||
## API change considerations | ||
|
||
First read the [API changes] document for background on how to make changes in the API. | ||
|
||
When writing a design proposal, you must consider the following: | ||
|
||
### API versions | ||
|
||
See [API versions] for details on the semantic meaning of the API versions. Changes to how | ||
existing fields are validated, defaulted, or interpreted requires an API version change. | ||
|
||
### API groups | ||
|
||
It is important to pick the correct API group for your API. This will ensure that it is discoverable | ||
by users and is maintained in concert with related APIs. Current API groups: | ||
|
||
| Group | Description | | ||
| ------ | ----------- | | ||
| abac | | | ||
| apps | | | ||
| authentication | | | ||
| authorization | | | ||
| autoscaling | | | ||
| batch | | | ||
| certificates | | | ||
| imagepolicy | | | ||
| policy | | | ||
| rbac | | | ||
| settings | | | ||
| storage | | | ||
|
||
|
||
## Related documents | ||
|
||
- [API changes] | ||
- [API conventions] | ||
- [OARP roles model](https://stumblingabout.com/tag/oarp/) | ||
- [RACI roles model](http://www.valuebasedmanagement.net/methods_raci.html) | ||
|
||
[API versions]: https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md#alpha-beta-and-stable-versions | ||
[@mention]: https://help.github.com/articles/basic-writing-and-formatting-syntax/#mentioning-users-and-teams | ||
[own]: https://github.com/kubernetes/community/blob/master/contributors/sig-ownership.md | ||
[special interest groups]: https://github.com/kubernetes/community/blob/master/README.md#special-interest-groups-sig | ||
[design proposal PR template]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-proposal-design-template.md | ||
[design summary template]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-proposal-issue-template.md | ||
[API changes]: https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md | ||
[contributing to SIG cli]: https://github.com/kubernetes/community/blob/master/sig-cli/contributing.md | ||
[kubernetes/kubernetes]: https://github.com/kubernetes/kubernetes/ | ||
[kubernetes/features]: https://github.com/kubernetes/features/ | ||
[kubernetes/kubernetes.github.io]: https://github.com/kubernetes/kubernetes.github.io/ | ||
[kubernetes/community]: https://github.com/kubernetes/community/ | ||
[API changes]: https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md | ||
[API conventions]: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also be useful to sketch a more general proposal template so that we can evaluate the similarities / differences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. Each SIG could decide whether it wanted to use the general template, or fork it an modify it. I suspect each SIG will want to add SIG-specific considerations.