-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set SupportedVersion on GatewayClass #1301
Set SupportedVersion on GatewayClass #1301
Conversation
✅ Deploy Preview for nginx-gateway-fabric canceled.
|
@nginxinc/nginx-gateway-fabric part of the acceptance criteria of this issue is to "Update the upgrade docs to warn users about ensuring both NGF and the Gateway CRDs are updated together." I looked at the upgrade instructions and don't think this is necessary anymore. Let me know if you disagree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
introducing predicates in the store is 👍
What if we update the following docs (and similarly for Helm) with something like below?
Verify that the current and the new NGINX Gateway Fabric version is compatible with the Gateway API resources. Refer to the [Technical Specifications]({{< relref "reference/technical-specifications.md" >}}) for details. If the current version is not compatible, NGINX Gateway Fabric will stop serving traffic during a period after your upgrade the Gateway API resources and before you upgrade NGINX Gateway Fabric to the new version. |
@pleshakov I think this note makes more sense in the release notes when there's a known issue upgrading to the new version. |
Let's say current NFG supports Gateway API X, but doesn't support Y. The next NGF supports Gateway API Y. |
This release of NGINX Gateway Fabric adds support for Gateway API Y. |
added some style suggestions |
68e9aed
to
90480e5
Compare
What was the reason for introducing predicates in the store? Having a little difficulty understanding if its like a refactor thing or if it ties into the SupportedVersion on the GatewayClass. |
@bjee19 it's both 😄 The bundle version annotation on the Gateway API CRDs contains the installed version that we need to validate. For these CRDs, we want to trigger a change when the bundle version annotation changes. However, the Predicates allow us to apply custom logic for determining if a resource changes. For Gateway API CRDs, we only want to trigger a change if the bundle version annotation changes. For a Gateway, we only want to trigger a change if the generation changes. For a Secret, we only want to trigger a change if it is referenced by the last graph. |
90480e5
to
8b45826
Compare
Proposed changes
Problem: NGF does not set the SupportedVersion condition on the GatewayClass.
From the spec:
Solution: Set the SupportedVersion condition on the GatewayClass.
This PR adds a new controller that watches the metadata of CRDs. CRD events are filtered using a custom predicate that inspects the
gateway.networking.k8s.io/bundle-version
annotation. CRDs without this annotation will be ignored. Updates to this annotation will trigger a state change and build a new graph. This required some changes to how we determine if the state has changed in thechangeTrackingUpdater
.Below is a table that shows how the SupportedVersion and Accepted conditions are set for different combinations of major and minor versions (using our current supported version v1.0.0):
When we update the Gateway API version, we will have to update the supported version in the code.
Testing:
Closes #1178
Checklist
Before creating a PR, run through this checklist and mark each as complete.