You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This GEP proposes to enhance the [GatewayClassStatus](https://github.com/kubernetes-sigs/gateway-api/blob/f2cd9bb92b4ff392416c40d6148ff7f76b30e649/apis/v1beta1/gatewayclass_types.go#L185) to include a list of Gateway API features supported by the installed GatewayClass.
8
+
This GEP proposes to enhance the [GatewayClassStatus](https://github.com/kubernetes-sigs/gateway-api/blob/f2cd9bb92b4ff392416c40d6148ff7f76b30e649/apis/v1beta1/gatewayclass_types.go#L185) to include a list of Gateway API features supported by the installed GatewayClass.
9
9
10
10
## Goals
11
11
@@ -17,16 +17,12 @@ This GEP proposes to enhance the [GatewayClassStatus](https://github.com/kuberne
17
17
18
18
* Provide foundation for tools to block or warn when unsupported features are used.
19
19
20
-
21
20
## Non-Goals
22
21
23
22
* Validate correctness of supported features published by the implementation.
24
-
Meaning we don't intend to verify whether the supported features reported by
25
-
the implementation are indeed supported.
23
+
Meaning we don't intend to verify whether the supported features reported by the implementation are indeed supported.
26
24
27
-
However, the supported features in the status of the GatewayClass should
28
-
make it very easy for any individual to run conformance tests against the
29
-
GatewayClass using our conformance tooling.
25
+
However, the supported features in the status of the GatewayClass should make it easy for any individual to run conformance tests against the GatewayClass using our conformance tooling.
30
26
31
27
## Introduction
32
28
@@ -45,15 +41,14 @@ Implementations **must** publish the supported features before Accepting the Gat
45
41
46
42
Implementations are free to decide how they manage this information. A common approach could be to maintain static lists of supported features or using predefined sets.
47
43
48
-
Note: implementations must keep the published list sorted in ascending alphabetical order.
44
+
> Note: implementations must keep the published list sorted in ascending alphabetical order.
49
45
50
46
## API
51
47
52
48
This GEP proposes API changes describes as follow:
53
49
54
50
* Update the `GatewayClassStatus` struct to include a string-represented list of `SupportedFeatures`.
55
51
56
-
57
52
```go
58
53
// GatewayClassStatus is the current status for the GatewayClass.
59
54
typeGatewayClassStatusstruct {
@@ -106,6 +101,12 @@ status:
106
101
- HTTPRouteQueryParamMatching
107
102
108
103
```
104
+
105
+
### SupportedFeatures Guidance in GatewayClass
106
+
107
+
Only Gateway related features should be published on GatewayClass. The rest, i.e Mesh features should not be published under GatewayClass, and will likely to be published on the new Mesh resource CRD when it is ready [ref](https://github.com/kubernetes-sigs/gateway-api/pull/3950).
108
+
Mesh features published on GatewayClassStatus will be ignored by the conformance test suite along with a warning.
109
+
109
110
## Standardize features and conformance tests names
110
111
111
112
Before we add the supported features into our API, it is necessary to establish standardized naming and formatting conventions.
@@ -116,7 +117,7 @@ Before we add the supported features into our API, it is necessary to establish
116
117
117
118
Every feature should:
118
119
119
-
1. Start with the resource name. i.e HTTPRouteXXX
120
+
1. Start with the resource name. i.e HTTPRouteXXX.
120
121
2. Follow the PascalCase convention. Note that the resource name in the string should come as is and not be converted to PascalCase, i.e HTTPRoutePortRedirect and not HttpRoutePortRedirect.
121
122
3. Not exceed 128 characters.
122
123
4. Contain only letters and numbers
@@ -130,21 +131,40 @@ We should treat this guidance as "best effort" because we might have test files
130
131
131
132
In any case, the conformance tests file names should be meaningful and easy to understand.
132
133
134
+
#### Conformance report
135
+
136
+
In order for to verify that the list of features reported are indeed supported by GatewayClass tests will be run based on the features from the GatewayClassStatus.
137
+
If the source of Gateway features are not inferred and manually provided the conformance suite will block the report from being submitted.
138
+
139
+
#### Reporting Mesh features
140
+
141
+
As Mesh doesn't have a good place (yet) to populate SupportedFeatures, its features can be tested for compliance by using Conformance Profiles, or manually, providing features for test using `--supported-features` flag.
142
+
Until mesh features are posted on the Mesh resource CRD, the conformance suite will determine if conformance run is for [Mesh features](https://github.com/kubernetes-sigs/gateway-api/issues/3984) and will NOT block the report if provided manually.
143
+
144
+
#### Staying Compliant
145
+
146
+
SupportedFeatures will become available starting 1.4 release as a standard feature, which means that all Gateway implementations will be expected to define and populate SupportedFeatures in the GatewayClass' Status.
147
+
The conformance test suite will be based on inferring supported features from GatewayClassStatus,
148
+
meaning if you want to generate passing report, features should be populated there.
149
+
There will be a grace period until the 1.5 release, after which all Gateway Conformance Reports will need to be generated based on the SupportedFeatures field in GatewayClass status (with the exception of Mesh features described above).
150
+
151
+
The core purpose of conformance tests for GatewayClass is to verify that reported features are truly supported.
152
+
While the community currently operates on a trust-based system for conformance reports, programmatically inferring features from the GatewayClass status field creates a strong, verifiable link between an implementation's claims and the test results.
153
+
Having this connection between supported features and conformance tests, helps improve the UX and make it easier for implementers to run the correct conformance tests.
133
154
134
155
## Followups
135
156
136
157
Before we make the changes we need to;
137
158
138
159
1. Change the names of the supported features and conformance tests that don't conform with the formatting rules.
139
160
140
-
141
161
## Alternatives
142
162
143
163
### Re-using ConformanceProfiles structs
144
164
145
165
We could use the same structs as we do in conformance profile object, more specifically, the [ProfileReport](https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/apis/v1alpha1/profilereport.go#LL24C6-L24C19) struct.
146
166
147
-
Though it would be nice to have only one place to update, these structs seems to include much more data relevant to the conformance report but not for our use case.
167
+
Though it would be nice to have only one place to update, these structs seems to include much more data relevant to the conformance report but not for our use case.
148
168
149
169
That said, conformance profiles are still at experimental stage, we could explore the option to create a shared struct that will be used both for the conformance reports and for the GatewayClass status.
150
170
@@ -158,8 +178,7 @@ However, having the supported features published in the GatewayClass Status adds
158
178
* We could build a mechanism or a tool to block or warn when unsupported features are used.
159
179
* Users will be able to select the GatewayClass that suits their needs without having to refer to documentation or conformance reports.
160
180
161
-
This does not cover a future piece of work we want to implement which is to warn/block users from applying a Gateway API object if the installed GWC doesn't support it. (originally suggested in [#1804](https://github.com/kubernetes-sigs/gateway-api/issues/1804)).
162
-
181
+
This does not cover a future piece of work we want to implement which is to warn/block users from applying a Gateway API object if the installed GWC doesn't support it. (originally suggested in [#1804](https://github.com/kubernetes-sigs/gateway-api/issues/1804)).
163
182
164
183
## References
165
184
@@ -169,6 +188,7 @@ This does not cover a future piece of work we want to implement which is to warn
169
188
## Future Work
170
189
171
190
### Research the development of an unsupported feature warning/blocking mechanism
191
+
172
192
Once the GatewayClass features support are is published into the status we could look into;
173
193
174
194
1. Using the supported features in the webhook to validate or block attempts to apply manifests with unsupported features.
@@ -181,7 +201,7 @@ Once the GatewayClass features support are is published into the status we could
181
201
182
202
We got some feedback that it will be useful to indicate which Gateway API version the implementation supports. So when we have supported features published in the GatewayClass Status, users will also be able to understand that those are the supported features for a specific Gateway API version.
183
203
184
-
This work is likely to require its own small GEP but ideally what this field would mean is that an implementation supports Max(vX.X).
204
+
This work is likely to require its own small GEP but ideally what this field would mean is that an implementation supports Max(vX.X).
185
205
186
206
The value of it is to provide a better user experience and also more foundation for tools to be able to warn for example when a GatewayClass and CRDs have mismatched versions.
0 commit comments