|
| 1 | +# Guidelines for contributing api changes |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Modifications to the core Kubernetes api have a material impact on the Kubernetes project, and |
| 6 | +undergo thorough review and discussion before they are accepted. This document outlines the |
| 7 | +review process and what is expected of api contributors. |
| 8 | + |
| 9 | +## Changes that qualify as api changes |
| 10 | + |
| 11 | +Any changes to existing or new apis are subject to the process outlined in this document. |
| 12 | + |
| 13 | +The following qualify as api changes: |
| 14 | + |
| 15 | +- Adding, removing, or modifying api types (e.g. through types.go, or by defining a new annotation) |
| 16 | +- Changing the version of an existing type (e.g. v1alpha1 to v1beta1) |
| 17 | +- Adding, removing, or modifying subresources for existing types. (e.g. /scale) |
| 18 | +- Material changes to how fields on existing types are interpreted / used |
| 19 | + |
| 20 | +The following on their own do not qualify as api changes, but should follow the process defined by the related |
| 21 | +[special interest groups]. |
| 22 | + |
| 23 | +- Adding or changing a command or flag to kubectl: sig-cli |
| 24 | +- Building new command line tools: sig-cli |
| 25 | +- Adding or changing a flag to kubelet: sig-node |
| 26 | +- Adding or changing a flag to apiserver: sig-api-machinery |
| 27 | +- Refactoring code |
| 28 | +- Building extensions |
| 29 | + |
| 30 | +## Life of an api change |
| 31 | + |
| 32 | +1. Start a discussion |
| 33 | +2. Write a short description |
| 34 | +3. Write a detailed design proposal |
| 35 | +4. Schedule a design review |
| 36 | +5. Implement the proposal |
| 37 | + |
| 38 | +### Start a discussion. |
| 39 | + |
| 40 | +Expected time for decision: 1-4 weeks (depending on the sig and feature) |
| 41 | + |
| 42 | +Start a discussion with the relevant [special interest groups] that will [own] the changes. |
| 43 | +Depending on the sig, this may be done via sig meetings, email groups, slack channel, etc. |
| 44 | + |
| 45 | +### Write a short description |
| 46 | + |
| 47 | +Expected time for decision: 2 weeks |
| 48 | + |
| 49 | +Write a short description of the api changes by copying the [design summary template] |
| 50 | +into a new issue, and [@mention] @kubernetes/api-reviewers and the owning sig reviewers |
| 51 | +group. |
| 52 | + |
| 53 | +Determine whether @kubernetes/api-reviewers is willing to accept a design proposal |
| 54 | +for your feature. The answer could be "no, we don't want to solve this problem this way." |
| 55 | +or "no, this is something we want, but cannot commit the resources to reviewing it this release." |
| 56 | + |
| 57 | +### Write a detailed design proposal |
| 58 | + |
| 59 | +Expected time for initial feedback: 3-6 weeks |
| 60 | + |
| 61 | +Write a detailed design proposal PR using the [design proposal PR template]. [@mention] |
| 62 | +@kubernetes/api-reviewers and the appropriate sigs on the PR and reference the original |
| 63 | +issue in the PR description. |
| 64 | + |
| 65 | +### Schedule a design review |
| 66 | + |
| 67 | +Expected time for next slot: 4-8 weeks |
| 68 | + |
| 69 | +Schedule a time slow for your design to be reviewed. |
| 70 | + |
| 71 | +Design approvers: |
| 72 | +- @smarterclayton |
| 73 | +- @bgrant |
| 74 | +- @thockin |
| 75 | + |
| 76 | +### Implement the proposal |
| 77 | + |
| 78 | +Once the proposal has been accepted an merged, you can begin implementing the solution. |
| 79 | + |
| 80 | +## How to escalate |
| 81 | + |
| 82 | +Escalation should be done through the owning sig. If you need help getting attention, reach out to your |
| 83 | +sig. |
| 84 | + |
| 85 | +## Api change considerations |
| 86 | + |
| 87 | +First read the [api changes] document for background on how to make changes in the api. |
| 88 | + |
| 89 | +When writing a design proposal, you must consider the following: |
| 90 | + |
| 91 | +### Api version semantics |
| 92 | + |
| 93 | +- *Alpha* |
| 94 | + |
| 95 | +Alpha versioned apis DO NOT guarantee backward compatibility between Kubernetes minor versions. |
| 96 | + |
| 97 | +- *Beta* |
| 98 | + |
| 99 | +Beta versioned apis DO guarantee backward compatibility between Kubernetes minor versions but |
| 100 | +are may have some known issues or unaddressed edge cases. Beta apis may miss some functionality |
| 101 | +that would be needed to consider the api GA. |
| 102 | + |
| 103 | +- GA |
| 104 | + |
| 105 | +GA versioned apis DO guarantee backward compatibility between Kubernetes minor versions and |
| 106 | +are considered to be fully featured. GA apis should have few known issues or edge cases. |
| 107 | + |
| 108 | +### Api group semantics |
| 109 | + |
| 110 | +It is important to pick the correct api group for your api. This will ensure that it is discoverable |
| 111 | +by users and is maintained in concert with related apis. Current api groups: |
| 112 | + |
| 113 | +| Group | Description | |
| 114 | +|---|---| |
| 115 | +| abac | | |
| 116 | +| apps | | |
| 117 | +| authentication | | |
| 118 | +| authorization | | |
| 119 | +| autoscaling | | |
| 120 | +| batch | | |
| 121 | +| certificates | | |
| 122 | +| componentconfig | | |
| 123 | +| imagepolicy | | |
| 124 | +| policy | | |
| 125 | +| rbac | | |
| 126 | +| settings | | |
| 127 | +| storage | | |
| 128 | + |
| 129 | +[@mention]: https://help.github.com/articles/basic-writing-and-formatting-syntax/#mentioning-users-and-teams |
| 130 | +[own]: https://github.com/kubernetes/community/blob/master/contributors/sig-ownership.md |
| 131 | +[special interest groups]: https://github.com/kubernetes/community/blob/master/README.md#special-interest-groups-sig |
| 132 | +[design proposal PR template]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-proposal-design-template.md |
| 133 | +[design summary template]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-proposal-issue-template.md |
| 134 | +[api changes]: https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md |
0 commit comments