Skip to content

Commit d15bc9d

Browse files
committed
formalize requirements for feature gates enabled in production clusters by default
1 parent b8013bf commit d15bc9d

File tree

3 files changed

+287
-1
lines changed

3 files changed

+287
-1
lines changed

keps/NNNN-kep-template/README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,22 @@ Below are some examples to consider, in addition to the aforementioned [maturity
373373
- Gather feedback from developers and surveys
374374
- Complete features A, B, C
375375
- Additional tests are in Testgrid and linked in KEP
376+
- More rigorous forms of testing—e.g., downgrade tests and scalability tests
377+
- All functionality completed
378+
- All security enforcement completed
379+
- All testing requirements completed
380+
- All known pre-release issues and gaps resolved
381+
382+
**Note:** Beta criteria must include all functional, security, and testing requirements along with resolving all issues and gaps identified
376383
377384
#### GA
378385
379386
- N examples of real-world usage
380387
- N installs
381-
- More rigorous forms of testing—e.g., downgrade tests and scalability tests
382388
- Allowing time for feedback
389+
- All issues and gaps identified as feedback during beta are resolved
390+
391+
**Note:** GA criteria must not include any functional, security, or testing requirements. Those must be beta requirements.
383392
384393
**Note:** Generally we also wait at least two releases between beta and
385394
GA/stable, because there's no opportunity for user feedback, or even bug reports,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
<!--
2+
**Note:** When your KEP is complete, all of these comment blocks should be removed.
3+
4+
To get started with this template:
5+
6+
- [ ] **Pick a hosting SIG.**
7+
Make sure that the problem space is something the SIG is interested in taking
8+
up. KEPs should not be checked in without a sponsoring SIG.
9+
- [ ] **Create an issue in kubernetes/enhancements**
10+
When filing an enhancement tracking issue, please make sure to complete all
11+
fields in that template. One of the fields asks for a link to the KEP. You
12+
can leave that blank until this KEP is filed, and then go back to the
13+
enhancement and add the link.
14+
- [ ] **Make a copy of this template directory.**
15+
Copy this template into the owning SIG's directory and name it
16+
`NNNN-short-descriptive-title`, where `NNNN` is the issue number (with no
17+
leading-zero padding) assigned to your enhancement above.
18+
- [ ] **Fill out as much of the kep.yaml file as you can.**
19+
At minimum, you should fill in the "Title", "Authors", "Owning-sig",
20+
"Status", and date-related fields.
21+
- [ ] **Fill out this file as best you can.**
22+
At minimum, you should fill in the "Summary" and "Motivation" sections.
23+
These should be easy if you've preflighted the idea of the KEP with the
24+
appropriate SIG(s).
25+
- [ ] **Create a PR for this KEP.**
26+
Assign it to people in the SIG who are sponsoring this process.
27+
- [ ] **Merge early and iterate.**
28+
Avoid getting hung up on specific details and instead aim to get the goals of
29+
the KEP clarified and merged quickly. The best way to do this is to just
30+
start with the high-level sections and fill out details incrementally in
31+
subsequent PRs.
32+
33+
Just because a KEP is merged does not mean it is complete or approved. Any KEP
34+
marked as `provisional` is a working document and subject to change. You can
35+
denote sections that are under active debate as follows:
36+
37+
```
38+
<<[UNRESOLVED optional short context or usernames ]>>
39+
Stuff that is being argued.
40+
<<[/UNRESOLVED]>>
41+
```
42+
43+
When editing KEPS, aim for tightly-scoped, single-topic PRs to keep discussions
44+
focused. If you disagree with what is already in a document, open a new PR
45+
with suggested changes.
46+
47+
One KEP corresponds to one "feature" or "enhancement" for its whole lifecycle.
48+
You do not need a new KEP to move from beta to GA, for example. If
49+
new details emerge that belong in the KEP, edit the KEP. Once a feature has become
50+
"implemented", major changes should get new KEPs.
51+
52+
The canonical place for the latest set of instructions (and the likely source
53+
of this file) is [here](/keps/NNNN-kep-template/README.md).
54+
55+
**Note:** Any PRs to move a KEP to `implementable`, or significant changes once
56+
it is marked `implementable`, must be approved by each of the KEP approvers.
57+
If none of those approvers are still appropriate, then changes to that list
58+
should be approved by the remaining approvers and/or the owning SIG (or
59+
SIG Architecture for cross-cutting KEPs).
60+
-->
61+
# KEP-NNNN: Beta Feature Gate Promotion Requirements
62+
63+
<!--
64+
This is the title of your KEP. Keep it short, simple, and descriptive. A good
65+
title can help communicate what the KEP is and should be considered as part of
66+
any review.
67+
-->
68+
69+
<!--
70+
A table of contents is helpful for quickly jumping to sections of a KEP and for
71+
highlighting any additional information provided beyond the standard KEP
72+
template.
73+
74+
Ensure the TOC is wrapped with
75+
<code>&lt;!-- toc --&rt;&lt;!-- /toc --&rt;</code>
76+
tags, and then generate with `hack/update-toc.sh`.
77+
-->
78+
79+
<!-- toc -->
80+
- [Release Signoff Checklist](#release-signoff-checklist)
81+
- [Summary](#summary)
82+
- [Motivation](#motivation)
83+
- [Goals](#goals)
84+
- [Non-Goals](#non-goals)
85+
- [Proposal](#proposal)
86+
- [User Stories (Optional)](#user-stories-optional)
87+
- [Story 1](#story-1)
88+
- [Story 2](#story-2)
89+
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
90+
- [Risks and Mitigations](#risks-and-mitigations)
91+
- [Design Details](#design-details)
92+
- [Test Plan](#test-plan)
93+
- [Prerequisite testing updates](#prerequisite-testing-updates)
94+
- [Unit tests](#unit-tests)
95+
- [Integration tests](#integration-tests)
96+
- [e2e tests](#e2e-tests)
97+
- [Graduation Criteria](#graduation-criteria)
98+
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
99+
- [Version Skew Strategy](#version-skew-strategy)
100+
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
101+
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
102+
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
103+
- [Monitoring Requirements](#monitoring-requirements)
104+
- [Dependencies](#dependencies)
105+
- [Scalability](#scalability)
106+
- [Troubleshooting](#troubleshooting)
107+
- [Implementation History](#implementation-history)
108+
- [Drawbacks](#drawbacks)
109+
- [Alternatives](#alternatives)
110+
- [Infrastructure Needed (Optional)](#infrastructure-needed-optional)
111+
<!-- /toc -->
112+
113+
## Release Signoff Checklist
114+
115+
<!--
116+
**ACTION REQUIRED:** In order to merge code into a release, there must be an
117+
issue in [kubernetes/enhancements] referencing this KEP and targeting a release
118+
milestone **before the [Enhancement Freeze](https://git.k8s.io/sig-release/releases)
119+
of the targeted release**.
120+
121+
For enhancements that make changes to code or processes/procedures in core
122+
Kubernetes—i.e., [kubernetes/kubernetes], we require the following Release
123+
Signoff checklist to be completed.
124+
125+
Check these off as they are completed for the Release Team to track. These
126+
checklist items _must_ be updated for the enhancement to be released.
127+
-->
128+
129+
Items marked with (R) are required *prior to targeting to a milestone / release*.
130+
131+
- [ ] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
132+
- [ ] (R) KEP approvers have approved the KEP status as `implementable`
133+
- [ ] (R) Design details are appropriately documented
134+
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
135+
- [ ] e2e Tests for all Beta API Operations (endpoints)
136+
- [ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
137+
- [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
138+
- [ ] (R) Graduation criteria is in place
139+
- [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
140+
- [ ] (R) Production readiness review completed
141+
- [ ] (R) Production readiness review approved
142+
- [ ] "Implementation History" section is up-to-date for milestone
143+
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
144+
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
145+
146+
<!--
147+
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
148+
-->
149+
150+
[kubernetes.io]: https://kubernetes.io/
151+
[kubernetes/enhancements]: https://git.k8s.io/enhancements
152+
[kubernetes/kubernetes]: https://git.k8s.io/kubernetes
153+
[kubernetes/website]: https://git.k8s.io/website
154+
155+
## Summary
156+
157+
Features gates must include all functional, security, and testing requirements along with
158+
resolving all issues and gaps identified prior to being enabled by default.
159+
The only valid GA criteria are “all issues and gaps identified as feedback during beta are resolved”.
160+
161+
## Motivation
162+
163+
Features gates that are enabled by default are enabled in every production Kubernetes cluster in the world.
164+
We must avoid making every production cluster into unstable or incomplete feature testing clusters.
165+
Even feature gates that make flags accessible, but require a secondary configuration to use must be
166+
stable, because it is unrealistic to expect everyone to understand the graduation stages of various flags
167+
for each release: the only stages that really matter are "takes enabling an explicit alpha feature gate"
168+
and "my production cluster accepts this as valid by default".
169+
170+
### Goals
171+
172+
* Features gates must include all functional, security, and testing requirements along with
173+
resolving all issues and gaps identified prior to being enabled by default.
174+
* The only valid GA criteria are “all issues and gaps identified as feedback during beta are resolved”.
175+
176+
### Non-Goals
177+
178+
* Changing beta APIs off by default rules.
179+
* Change the imperfect mechanisms we have for API evolution.
180+
181+
## Proposal
182+
183+
Kubernetes feature gates have three levels: GA, Beta, and Alpha.
184+
1. GA means that a feature gate is unconditionally enabled in all production kubernetes clusters and
185+
that feature cannot be disabled.
186+
2. Beta means that a feature gate is usually enabled in all production Kubernetes clusters by default
187+
and that feature can be disabled.
188+
Exceptions exist for entirely new APIs and some node features, but this broadly the case.
189+
3. Alpha means that a feature gate is disabled in all production Kubernetes clusters by default and
190+
can be optionally enabled by setting a `--feature-gate` command line argument.
191+
192+
Making the jump to GA (cannot be disabled), without actual field experience is irresponsible.
193+
The first time we take a feature gate enabled by default in production Kubernetes clusters, we must
194+
have a way to disable the feature in case of unexpected stability, performance, or security issues.
195+
196+
Enabling incomplete features in production Kubernetes clusters by default is irresponsible.
197+
Features that are known to be incomplete naturally bring with them additional stability, performance, and security issues.
198+
Once a feature has been enabled in a production Kubernetes cluster by default, adding to it carries
199+
greater risk to upgrading clusters and the ecosystem.
200+
The feature can easily have become relied upon by workloads and other platform extensions.
201+
If an accident happens in adding those capabilities with stability, performance, and security the
202+
cost to disable those features in a cluster becomes significantly greater and breaks existing
203+
clusters, workloads and use-cases.
204+
This posture makes upgrades higher risk than necessary.
205+
206+
To balance these concerns, we are changing how we evaluate Beta and GA stability criteria.
207+
The only valid GA criteria are “all issues and gaps identified as feedback during beta are resolved”.
208+
Promotion from Beta to GA must be zero-diff for the release.
209+
This means that Beta criteria must include all functional, security, and testing requirements along
210+
with resolving all issues and gaps identified prior to beta.
211+
212+
Phasing in larger features over time can be done by bringing separate feature gates through alpha, beta, and GA.
213+
Each feature gate needs to meet the beta and GA criteria for completeness, functional, security, and testing.
214+
After meeting hte criteria for enabled by default, and at the sig's discretion, the new feature gate could be
215+
set to enabled by default in the release it is introduced.
216+
Importantly, the features need to behave in a way that allows old and new clients to interoperate and new additions
217+
to larger features able to be independently disablable with their own path for GA.
218+
219+
### Risks and Mitigations
220+
221+
#### What if I need to add capability to my feature?
222+
To handle this situation, we described above how to add second feature gate for the new behavior.
223+
This provides a mechanism for adding needed capability, but ensures that
224+
cluster-admins never end up stuck after upgrade because they rely on v1.Y-1 behavior that new capability
225+
in v1.Y broke under the same feature gate.
226+
227+
#### Who will make sure that new KEPs follow the promotion rules?
228+
We'll adjust the KEP template to indicate the allowed criteria, so authors should notice.
229+
SIG approvers should enforce those standards.
230+
PRR approvers can be a final backstop.
231+
232+
### Graduation Criteria
233+
234+
This document is our new position once merged until it is superceded by another position statement.
235+
236+
## Drawbacks
237+
238+
### This may slow the rate that new features are promoted.
239+
For this to be true, that would mean that we previously enabled feature gates in production that were knowingly
240+
incomplete for functional, security, testing, or known bugs.
241+
We hope this was not the common case, but if it was the common enough to have an impact, we're pleased that
242+
the result is preventing incomplete feature gates from being enabled in production clusters.
243+
244+
## Alternatives
245+
246+
None proposed so far.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Beta Feature Gate Promotion Requirements
2+
kep-number: NNNN
3+
authors:
4+
- "@deads2k"
5+
owning-sig: sig-architecture
6+
participating-sigs:
7+
status: implemented
8+
creation-date: 2025-04-02
9+
reviewers:
10+
- "@liggitt"
11+
- "@thockin"
12+
approvers:
13+
- "@johnbelamaric"
14+
- "@dims"
15+
- "@derekwaynecarr"
16+
17+
see-also:
18+
- "/keps/sig-architecture/3136-beta-apis-off-by-default"
19+
replaces:
20+
21+
stage: stable
22+
23+
latest-milestone: "v1.34"
24+
25+
milestone:
26+
stable: "v1.34"
27+
28+
feature-gates:
29+
disable-supported: false
30+
31+
metrics:

0 commit comments

Comments
 (0)