generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2062 from mlavacca/gep-1709
chore: conformance profiles API version and channel
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,6 +253,41 @@ move on to [certification](#certification) to report the results. | |
[go]:https://go.dev | ||
[lib]:https://pkg.go.dev/sigs.k8s.io/[email protected]/conformance/utils/suite | ||
|
||
### Gateway API version and channel | ||
|
||
The certification is related to a specific API version and a specific channel, | ||
therefore such information must be included in the final report. At test suite | ||
setup time, the conformance profile machinery gets all the CRDs with the field | ||
`.spec.group` equal to `gateway.networking.k8s.io`, and for each of them checks | ||
the annotations `gateway.networking.k8s.io/bundle-version` and | ||
`gateway.networking.k8s.io/channel`. If there are `CRD`s with different | ||
versions, the certification fails specifying that it's not possible to run the | ||
tests as there are different Gateway API versions installed in the cluster. If | ||
there are CRDs with different channels, the certification fails specifying that | ||
it's not possible to run the tests as there are different Gateway API channels | ||
installed in the cluster. If all the Gateway API `CRD`s have the same version | ||
and the same channel, the tests can be run and the detected version and channel | ||
will be set in the `GatewayAPIVersion` and `gatewayAPIChannel` fields of the | ||
final report. Furthermore, the suite must run all the experimental tests when | ||
the channel is `experimental`, and the related features are enabled. | ||
|
||
In addition to the `CRD`s version, the suite needs to check its version in | ||
relation to the `CRD`s one. To do so, a new `.go` file containing the current | ||
Gateway API version is introduced in the project and compiled with the | ||
conformance profile suite: | ||
|
||
```go | ||
const GatewayAPIVersion = "0.7.0" | ||
``` | ||
|
||
At test suite setup time the conformance profile suite checks the `CRD`s version | ||
and the suite version; if the two versions differ, the certification fails. A | ||
new generator will be introduced in the project to generate the aforementioned | ||
`.go` file starting from a VERSION file contained in the root folder. Such a | ||
VERSION file contains the semver of the latest release and is manually bumped at | ||
release time. The script hack/verify-all.sh will be updated to ensure the | ||
generated `.go` file is up to date with the VERSION file. | ||
|
||
### Certification | ||
|
||
Implementations will be able to report their conformance testing results using | ||
|
@@ -280,6 +315,7 @@ implementation: | |
- @acme/maintainers | ||
date: "2023-02-28 20:29:41+00:00" | ||
gatewayAPIVersion: v0.7.0 | ||
gatewayAPIChannel: standard | ||
profiles: | ||
- name: tcp | ||
core: | ||
|
@@ -360,6 +396,7 @@ implementation: | |
- @acme/maintainers | ||
date: "2022-09-28 20:29:41+00:00" | ||
gatewayAPIVersion: v0.6.2 | ||
gatewayAPIChannel: standard | ||
profiles: | ||
- name: tcp | ||
core: | ||
|
@@ -417,6 +454,7 @@ implementation: | |
- @acme/maintainers | ||
date: "2022-08-28 20:29:41+00:00" | ||
gatewayAPIVersion: v0.6.1 | ||
gatewayAPIChannel: standard | ||
profiles: | ||
- name: tcp | ||
core: | ||
|
@@ -465,6 +503,7 @@ implementation: | |
- @acme/maintainers | ||
date: "2022-07-28 20:29:41+00:00" | ||
gatewayAPIVersion: v0.6.0 | ||
gatewayAPIChannel: standard | ||
profiles: | ||
- name: http | ||
core: | ||
|