Skip to content

Commit 322066e

Browse files
authored
Merge pull request #8005 from SergeyKanzhelev/contributing_keps
contributing KEPs in SIG Node: best practices
2 parents 7712817 + 774d738 commit 322066e

File tree

1 file changed

+120
-6
lines changed

1 file changed

+120
-6
lines changed

Diff for: sig-node/CONTRIBUTING.md

+120-6
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,138 @@
22

33
Welcome!
44

5-
## For Kubernetes Contributions
5+
Thank you for your interest in contributing to SIG Node. SIG Node is one of the
6+
biggest SIGs in Kubernetes. Reliability and performance of millions of nodes
7+
running critical applications in production rely on the quality of your
8+
contribution(s). The diversity of workloads, environments, and the scale SIG
9+
Node needs to support makes every code change risky as all the side effects need
10+
to be evaluated.
11+
12+
Please make sure you understand and are up to the challenge. The contributing
13+
instructions are designed to help you.
14+
15+
## For Kubernetes Code Contributions
616

717
Read the [Kubernetes Contributor Guide](https://github.com/kubernetes/community/tree/master/contributors/guide#contributor-guide).
818

919
If you aspire to grow scope in the SIG, please review the [SIG Node contributor ladder](./sig-node-contributor-ladder.md) for SIG specific guidance.
1020

1121
### For Enhancements
1222

13-
SIG Node enhancements are available in the <https://github.com/kubernetes/enhancements/tree/master/keps/sig-node>.
14-
15-
#### Helpful Links for Sig-Node
23+
Find out if [your thing is an enhancement a.k.a KEP](https://github.com/kubernetes/enhancements/?tab=readme-ov-file#is-my-thing-an-enhancement).
24+
A good way to do that is to open and issue and get feedback from SIG Node
25+
reviewers and approvers. You can present your idea at a weekly
26+
sig-node meeting to get interactive and more immediate feedback.
27+
28+
If you plan to contribute an enhancement, please prepare yourself for at least 1
29+
year of engagement. A KEP takes at least 4 kubernetes releases to move from
30+
alpha to beta to GA. If there are API / kubelet skew considerations, it may take
31+
even longer. SIG Node expects that contributors commit to taking a KEP to GA stage to avoid
32+
[permanent betas](https://kubernetes.io/blog/2020/08/21/moving-forward-from-beta/#avoiding-permanent-beta).
33+
It is always surprising how much work is needed to productize the feature after
34+
it seems complete - addressing edge cases, comprehensive testing, and documentation
35+
take a lot of effort.
36+
37+
If you are not ready for this commitment, you can consider teaming up with other
38+
contributors in the community or contribute to a KEP driven by somebody else.
39+
40+
SIG Node enhancements are available:
41+
42+
- Committed KEPs [directory](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node)
43+
- All open KEPs [tracking issues](https://github.com/kubernetes/enhancements/issues?q=is%3Aissue+is%3Aopen+label%3Asig%2Fnode+)
44+
45+
Here are some best practices how to approach KEP development:
46+
It is based on a [talk](https://kcsna2023.sched.com/event/1Sp9i/implementing-a-big-feature-on-an-example-of-a-sidecar-container-kep)
47+
*"Implementing a big feature on an example of a Sidecar container KEP"*
48+
([Recording](https://www.youtube.com/watch?v=c3iV8E8EDUA), [Slides](https://static.sched.com/hosted_files/kcsna2023/a0/KCS-NA-2023-ppt.pdf)).
49+
50+
#### Before Starting
51+
52+
- **Prove the need**: Clearly articulate the problem the KEP addresses, identify
53+
the target audience, and demonstrate the community-wide benefits.
54+
- **Secure sponsorship and reviews**: Find sponsors, reviewers, and approvers
55+
early in the process to ensure alignment and avoid delays.
56+
- **Show commitment**: Demonstrate dedication to the KEP's success by actively
57+
working on its implementation and ensuring code quality.
58+
- **Manage expectations**: The KEP process takes time, anticipate at least two
59+
releases for beta and four for GA.
60+
61+
At this stage the expectation is that the proposal is written in general-enough
62+
terms as a Google Doc for easy commenting and fast collaborative editing.
63+
Sharing the design document with `[email protected]` for commenting and with SIG
64+
members `[email protected]` for commenting or in some cases
65+
editing is a good practice.
66+
67+
It is also very helpful to attend SIG Node weekly meeting to present your
68+
proposal. Most of the time meeting agenda is open to discuss any proposals.
69+
During the meeting you can gather initial feedback, find collaborators, and
70+
secure sponsorship.
71+
72+
#### API Design
73+
74+
- **Define use cases and scope**: Enumerate specific use cases and define the
75+
problem's boundaries to avoid scope creep.
76+
- **Consider the bigger picture**: Illustrate how the KEP fits into the existing
77+
Kubernetes design and how it will handle future requests.
78+
- **Document decisions**: Record all design decisions, including pros, cons, and
79+
responsible individuals.
80+
- **Address potential misuse**: Anticipate potential abuse or misuse scenarios
81+
and design the API to mitigate them.
82+
- **Engage reviewers**: Utilize SIG experts for API pre-reviews and PRR
83+
pre-reviews to gain support and streamline the review process.
84+
85+
Kubernetes API is a main interface many users experience Kubernetes. API
86+
approvers are often the most experienced community members, who can help ensure
87+
the feature fit Kubernetes best practices, will not break compatibility, and
88+
will fit nicely with other Kubernetes capabilities. Even if use cases were
89+
approved by SIG Node approvers, API approvers may reject the proposal and ask to
90+
redesign it.
91+
92+
Some KEPs may go back and forth between use cases and API design for many
93+
iterations. This often happens when use cases are not described completely or a
94+
lot of context is lost in written feedback. If the KEP is going in those
95+
circles, the recommendation is to request a meeting between SIG Approvers and
96+
API approvers driven by KEP author. It may be a dedicated meeting or an invite
97+
of API approvers to SIG Node weekly meeting or SIG Node approvers to API
98+
meeting.
99+
100+
Once API approval was received, SIG Node approvers will review it again as SIG
101+
always has the last word in the feature design.
102+
103+
Note, SIG approvers may request sign offs from other SIGs like Security,
104+
Instrumentation, Storage, Networking, Windows, etc. The process of getting
105+
approval is generally the same.
106+
107+
#### Implementation
108+
109+
- **Structure the implementation**: Divide the implementation into
110+
pre-factoring, minimal complete product, and post-API changes for better
111+
organization and review.
112+
- **Isolate feature gate logic**: Ensure the mainline code remains unaffected
113+
when the feature gate is disabled.
114+
- **Adapt and adjust**: Be prepared to modify the KEP's scope or features based
115+
on implementation challenges.
116+
- **Collaborate effectively**: Maintain communication through group chats or
117+
meetings and consider using a shared branch for better coordination.
118+
- **Improve the codebase**: Leave the code in a better state than you found it
119+
to facilitate future maintenance and enhance your credibility.
120+
121+
By adhering to these best practices, you can increase the chances of your KEP
122+
being successfully implemented and accepted.
123+
124+
Sometimes SIG may over-commit on KEPs for the release. And if two big KEPs
125+
touching the same code path, SIG may decide to only take one KEP for a release.
126+
Even if this is the case, properly structured KEP implementation will ensure
127+
that some progress was made for that release.
128+
129+
### Helpful Links for SIG Node
16130

17131
**Code**:
18132

19-
For general code organization, read [contributors/devel/README.md](../contributors/devel/README.md) for explaining things like
133+
For general code organization, read [contributors/devel/README.md](../contributors/devel/README.md) to learn about things like
20134
`vendor/`, `staging`, etc.
21135

22-
* Kubelet
136+
* kubelet
23137
* <https://github.com/kubernetes/kubernetes/tree/master/cmd/kubelet>
24138
* <https://github.com/kubernetes/kubernetes/tree/master/pkg/kubelet>
25139
* Probe: <https://github.com/kubernetes/kubernetes/tree/master/pkg/probe>

0 commit comments

Comments
 (0)