Skip to content

Commit a14be13

Browse files
authored
Merge pull request #2446 from robscott/standard-ga
Phasing out Beta from Versioning Guide
2 parents 8402518 + deccb41 commit a14be13

File tree

2 files changed

+137
-113
lines changed

2 files changed

+137
-113
lines changed

geps/gep-922.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,24 @@
33
* Issue: [#922](https://github.com/kubernetes-sigs/gateway-api/issues/922)
44
* Status: Standard
55

6+
!!! note
7+
Although this GEP serves as a reference for how we developed the Gateway API
8+
versioning model, it is not meant to be the current source of truth.
9+
Instead, please refer to our [official Versioning
10+
Policy](/concepts/versioning) for the most up-to-date guidelines.
11+
612
## TLDR
713
Each Gateway API release will be represented by a bundle version that represents
814
that specific combination of CRDs, API versions, and validating webhook. To
915
enable experimental fields, future releases of the API will include standard and
1016
experimental CRD tracks. Users will be able to access experimental features by
1117
installing the experimental CRDs. A cluster can contain either an experimental
12-
or standard CRD for any resource at a given time.
13-
18+
or standard CRD for any resource at a given time.
1419

1520
## Goals
1621
Provide a path for implementations to support:
1722

18-
* Users should have a predictable experience when interacting with Gateway API.
23+
* Users should have a predictable experience when interacting with Gateway API.
1924
* The API should be able to continue to safely evolve, including:
2025
* Loosening validation
2126
* Transitioning required fields to optional
@@ -123,7 +128,7 @@ recommended for production use.
123128

124129
If experimental fields are removed or renamed, the original field name should be
125130
removed from the go struct, with a tombstone comment ensuring the field name
126-
will not be reused.
131+
will not be reused.
127132

128133
Each CRD will be published with annotations that indicate their bundle version
129134
and channel:
@@ -146,7 +151,7 @@ messy.
146151

147152
### 2: Reuse Alpha API versions
148153
With this approach, we would only allow the use of these fields when using the
149-
alpha API.
154+
alpha API.
150155

151156
To simplify conversion, new fields will be added to all versions of the API,
152157
with some key exceptions:

site-src/concepts/versioning.md

Lines changed: 127 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,103 @@
22

33
## Overview
44
Each new release of Gateway API is defined with a "bundle version" that
5-
represents the Git tag of a release, such as v0.4.0. This contains the
5+
represents the Git tag of a release, such as v0.8.0. This contains the
66
following:
77

88
* API Types (Go bindings for the resources)
99
* CRDs (Kubernetes definitions of the resources)
10-
* Validating Webhook
11-
12-
### API Versions (e.g. v1alpha2, v1beta1)
13-
Within Gateway API, API versions are primarily used to indicate the stability of
14-
a resource. For example, if a resource has not yet graduated to beta, it is
15-
still possible that it could either be removed from the API or changed in
16-
backwards incompatible ways. For more information on API versions, refer to the
17-
[full Kubernetes API versioning
18-
documentation](https://kubernetes.io/docs/reference/using-api/#api-versioning).
19-
20-
![Lifecycle of New Gateway API Resources](/images/lifecycle-new-resources.png)
21-
<!-- Source: https://docs.google.com/presentation/d/1sfZTV-vlisDUIie_iK_B2HqKia_querT6m6T2_vbAk0/edit -->
22-
23-
### Release Channels (e.g. Experimental, Standard)
24-
Gateway API provides 2 release channels: an Experimental one and a Standard one.
10+
* Validating Webhook (Will be deprecated in v1.0 release)
11+
12+
### Release Channels
13+
Release channels are used to indicate feature stability within Gateway API. All
14+
new features and resources start in the Experimental release channel. From that
15+
point, these may graduate to the Standard release channel or be dropped from the
16+
API entirely.
17+
18+
The following diagram provides a high level overview of the lifecycle of a
19+
feature or resource proposed by a new [GEP](/geps/overview/) (enhancement
20+
proposal) in Gateway API:
21+
22+
```mermaid
23+
flowchart TD
24+
0([Implementable GEP]) --> A
25+
A>Experimental Channel] --> B([Widely used and working well?])
26+
B -->|Yes| C>Standard Channel]
27+
B -->|No| D([Could Changes Help?])
28+
D -->|Yes| E([Adjust and try again])
29+
D -->|No| F>Remove From API]
30+
E -->A
31+
32+
style A fill:#eeb
33+
style C fill:#beb
34+
style F fill:#ebb
35+
```
2536

2637
The Standard release channel includes:
2738

28-
* Resources that have graduated to beta
29-
* All fields that have graduated to standard and are no longer considered
30-
experimental
39+
* Resources that have graduated to Beta or GA API Versions (note that Beta API
40+
versions are being phased out in Gateway API)
41+
* All fields that have graduated to Standard from the Experimental Channel
3142

3243
The Experimental release channel includes everything in the Standard release
3344
channel, plus:
3445

35-
* Alpha API resources
36-
* New fields that are considered experimental and have not yet graduated to the
37-
standard channel
46+
* Resources with Alpha API Versions
47+
* All new fields before they graduate to Standard Channel
3848

3949
![Release Channel Overlap](/images/release-channel-overlap.svg)
4050
<!-- Source: https://docs.google.com/presentation/d/1sfZTV-vlisDUIie_iK_B2HqKia_querT6m6T2_vbAk0/edit -->
4151

42-
Release channels are used to indicate feature stability within Gateway API. For
43-
example, even if a resource has already graduated to beta, we need a way to test
44-
out new fields and features before committing to their long term stability. With
45-
upstream Kubernetes APIs, this is accomplished with [feature
46-
gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/).
47-
Unfortunately, CRDs do not have a similar concept yet.
48-
49-
Instead of trying to recreate feature gates in this project, we've introduced
50-
release channels. Starting in v0.5.0, all new fields and features will start in
51-
the Experimental release channel. From that point, these may graduate to the
52-
Standard release channel or be dropped from the API entirely. See
53-
[GEP-922](/geps/gep-922) for a more detailed discussion of this approach to new
54-
fields and features.
55-
56-
![Lifecycle of New Gateway API Fields](/images/lifecycle-new-fields.svg)
57-
<!-- Source: https://docs.google.com/presentation/d/1sfZTV-vlisDUIie_iK_B2HqKia_querT6m6T2_vbAk0/edit -->
52+
We recommend using the Standard Channel by default as it will provide a stable
53+
experience. Many implementations also provide support for the Experimental
54+
Channel which enables us to iterate on new features quickly. Note that this
55+
channel makes no backwards compatibility guarantees and breaking changes may be
56+
released at any point.
57+
58+
### API Versions
59+
Upstream Kubernetes APIs have 3 levels of stability, denoted by alpha, beta, and
60+
GA API versions. In Gateway API, we've narrowed this down to 2 levels of
61+
stability, expressed by our release channels as described above.
62+
63+
In general, this means that when resources graduate from the Experimental
64+
channel to the Standard Channel, they'll also be graduating from an Alpha API
65+
Version (v1alpha2) to a GA API Version (v1).
66+
67+
#### Rationale
68+
We're phasing out beta for the following reasons:
69+
70+
1. In most cases there are effectively two levels of API stability - installed
71+
by default (stable), and alpha/experimental (unstable). It's not obvious
72+
what value an intermediate (Beta) state would have for Gateway API.
73+
2. The further we separate the "stable" and "experimental" APIs, the longer it
74+
takes to get meaningful feedback on new features.
75+
3. Each unique API version we maintain comes with significant additional cost
76+
for users, implementers, and maintainers.
77+
78+
#### Beta
79+
Although some Gateway API resources already received a Beta API version when
80+
they graduated to the Standard Channel, that will not be the case for any
81+
additional resources. All future resources that graduate to Standard Channel
82+
will include a v1 API version as part of that process.
83+
84+
The resources that already have a beta API version (v1beta1) are:
85+
86+
* HTTPRoute
87+
* Gateway
88+
* GatewayClass
89+
* ReferenceGrant
90+
91+
In the upcoming v1.0 release, HTTPRoute, Gateway, and GatewayClass will all
92+
graduate to a GA API Version (v1).
93+
94+
ReferenceGrant is a special case since it is in the process of [transitioning
95+
into an upstream Kubernetes
96+
API](https://github.com/kubernetes/enhancements/issues/3766) that is owned by
97+
[sig-auth](https://github.com/kubernetes/community/blob/master/sig-auth/README.md).
98+
Until that is resolved, it is likely that ReferenceGrant will be effectively
99+
frozen as beta in Gateway API. When it is widely available as a built-in
100+
Kubernetes API, we will likely remove it from the Standard Channel of Gateway
101+
API.
58102

59103
## Version Indicators
60104
Each CRD will be published with annotations that indicate their bundle version
@@ -65,76 +109,63 @@ gateway.networking.k8s.io/bundle-version: v0.4.0
65109
gateway.networking.k8s.io/channel: standard|experimental
66110
```
67111

68-
## What can Change
112+
## What Can Change
69113
When using or implementing this API, it is important to understand what can
70-
change across API versions.
71-
72-
### Patch version (e.g. v0.4.0 -> v0.4.1)
73-
* Clarifications to godocs
74-
* Updates to CRDs and/or code to fix a bug
75-
* Conformance test fixes
76-
* Additional conformance test coverage for existing features
77-
* Fixes to typos
78-
79-
### Minor version (e.g. v0.4.0 -> v0.5.0)
114+
change across bundle versions.
115+
116+
### Patch Version (e.g. v0.4.0 -> v0.4.1)
117+
* API Spec:
118+
* Clarifications
119+
* Correcting typos
120+
* Bug fixes:
121+
* Correcting validation
122+
* Fixes to release process or artifacts
123+
* Conformance tests:
124+
* Fixes for existing tests
125+
* Additional conformance test coverage for existing features
126+
127+
### Minor Version (e.g. v0.4.0 -> v0.5.0)
80128
* Everything that is valid in a patch release
81-
* New experimental API fields or resources
82-
* Changes to recommended conditions or reasons in status
83-
* Loosened validation
84-
* Making required fields optional
85-
* Removal of experimental fields
86-
* Removal of experimental resources
87-
* Graduation of fields or resources from experimental to standard track
88-
* Changes to conformance tests to match spec updates
89-
* Introduction of a new **API version**, which may also include:
90-
* Renamed fields
91-
* Anything else that is valid in a new Kubernetes API version
92-
* Removal/tombstoning of beta fields
93-
* Removal of an API resource following [Kubernetes deprecation
129+
* Experimental Channel:
130+
* Adding new API fields or resources
131+
* Breaking changes for existing API fields or resources
132+
* Removing API fields or resources without prior deprecation
133+
* Standard Channel:
134+
* Graduation of fields or resources from Experimental to Standard Channel
135+
* Removal of an API resource following [Kubernetes deprecation
94136
policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/)
95-
96-
### Major version (e.g. v0.x to v1.0)
137+
* All Channels:
138+
* Changes to recommended conditions or reasons in status
139+
* Loosened validation (including making required fields optional)
140+
* Changes to conformance tests to match spec updates
141+
* Introduction of a new API version which may include renamed fields or
142+
anything else that is valid in a [new Kubernetes API
143+
version](https://kubernetes.io/docs/reference/using-api/#api-versioning)
144+
145+
### Major Version (e.g. v0.x to v1.0)
97146
* There are no API compatibility guarantees when the major version changes.
98147

99148
## Graduation Criteria
149+
For a resource, field, or feature to graduate from Experimental to Standard, it
150+
must meet the following criteria:
100151

101-
### Resources
102-
103-
#### Alpha -> Beta
104-
A resource to graduate from alpha to beta must meet the following criteria:
105-
106-
* Implemented by several implementations.
107-
* Conformance test framework is in place, with some coverage of basic
108-
functionality.
109-
* Validation is well thought out.
110-
* Most of the API surface is being exercised by users.
111-
* Approval from subproject owners + KEP reviewers.
112-
113-
#### Beta -> GA
114-
115-
A resource to graduate from beta to GA must meet the following criteria:
116-
117-
* Almost all of the fields and behavior have conformance test coverage.
152+
* Full conformance test coverage.
118153
* Multiple conformant implementations.
119154
* Widespread implementation and usage.
120-
* At least 6 months of soak time as a beta API.
155+
* At least 6 months of soak time as an alpha API.
156+
* No significant changes for at least 1 minor release and 3 months.
121157
* Approval from subproject owners + KEP reviewers.
122158

123-
### Fields
124-
125-
#### Experimental -> Standard
126-
As described above, field level stability is layered on top of beta and GA
127-
resources (no fields in alpha resources can be considered standard). The
128-
requirements for a field to graduate from experimental to standard depend on the
129-
API version of the resource it is a part of. For a field to be considered
130-
standard, it needs to meet the same criteria of the resource it is contained in.
159+
## Supported Versions
160+
This project aims to provide support for a wide range of Kubernetes versions with
161+
consistent upgrade experiences across versions. To accomplish that, we commit to:
131162

132-
If a resource has graduated to beta, an experimental field must meet all of the
133-
beta graduation criteria before graduating to standard. Similarly, if a resource
134-
has graduated to GA, a field must meet all of the beta and GA graduation
135-
criteria. There is one slight variation here, instead of 6 months of soak time
136-
as a beta API, a field graduating to standard requires 6 months of soak time as an
137-
experimental field.
163+
1. Support a minimum of the most recent 5 Kubernetes minor versions.
164+
2. Ensure that all Standard Channel changes between v1beta1 and v1 are fully
165+
compatible and convertible.
166+
3. Take every possible effort to avoid introduction of a conversion webhook. If
167+
a conversion webhook needs to be introduced, it will be supported for the
168+
lifetime of the API, or at least until an alternative is available.
138169

139170
## Out of Scope
140171
### Unreleased APIs
@@ -148,15 +179,3 @@ this project.
148179
We do not provide stability guarantees for source code imports. The Interfaces
149180
and behavior may change in an unexpected and backwards-incompatible way in any
150181
future release.
151-
152-
## Supported Versions
153-
154-
This project aims to provide support for a wide range of Kubernetes versions with
155-
consistent upgrade experiences across versions. To accomplish that, we commit to:
156-
157-
1. Support a minimum of the most recent 5 Kubernetes minor versions.
158-
2. Ensure that all standard channel changes between v1beta1 and v1 are fully
159-
compatible and convertible.
160-
3. Take every possible effort to avoid introduction of a conversion webhook. If
161-
a conversion webhook needs to be introduced, it will be supported for the
162-
lifetime of the API, or at least until an alternative is available.

0 commit comments

Comments
 (0)