-
Notifications
You must be signed in to change notification settings - Fork 596
change SupportedFeatures API to a list of subobjects #3200
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,9 +261,10 @@ type GatewayClassStatus struct { | |
Conditions []metav1.Condition `json:"conditions,omitempty"` | ||
|
||
// SupportedFeatures is the set of features the GatewayClass support. | ||
// It MUST be sorted in ascending alphabetical order. | ||
// It MUST be sorted in ascending alphabetical order by the Name key. | ||
// +optional | ||
// +listType=set | ||
// +listType=map | ||
// +listMapKey=name | ||
// <gateway:experimental> | ||
// +kubebuilder:validation:MaxItems=64 | ||
SupportedFeatures []SupportedFeature `json:"supportedFeatures,omitempty"` | ||
|
@@ -278,6 +279,10 @@ type GatewayClassList struct { | |
Items []GatewayClass `json:"items"` | ||
} | ||
|
||
// SupportedFeature is used to describe distinct features that are covered by | ||
// FeatureName is used to describe distinct features that are covered by | ||
// conformance tests. | ||
type SupportedFeature string | ||
type FeatureName string | ||
|
||
type SupportedFeature struct { | ||
Name FeatureName `json:"name"` | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. speaking on behalf of Envoy Gateway, where we enabled this feature by default, our users have not found just the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the rationale for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that rationale makes sense @robscott, a follow question is, are there any implementations that would like to implement this API in this current form ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, this iteration of the API is primarily about automation. From the manual form of I think what you're describing is primarily useful for someone that is trying to look at the full GatewayClass status and understand the nuance of what's supported, which I think is helpful, but not quite as high priority as the UX I described above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This API is the current form will benefit tooling like gwctl, but imo is not useful enough for end users who do not use tools like gwctl, which imo should drive the design of this API. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think user documentation belongs in CRD Status at all. IMO this should be removed from the API and documented in implementations websites. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I am mostly plus one to this, except from the supported features/profiles which could be really useful and improve the UX(through warning and automations) for an api where implementations not necessarily support all features. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
By "this", @howardjohn, do you mean SupportedFeatures in general, or the idea of a Personally, I'd like to see us do a few things once we get the current change in:
If we do the above, a lot of the reason for having this information inlined in the GatewayClass status goes away, because the Having some form of I think that it's still worth keeping this list as a list of named subobjects, even if we only have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm +1 to the idea proposed here and how it's implemented (using a slice of objects with a single I like the vision that @youngnick has portrayed around the overlap with Conformance Suite / Profiles and how eventually this may serve as an input to generating the Conformance reports. For this to be really useful with tooling like gwctl, we definitely should work towards a follow up for this change to come with with that canonical list of SupportedFeatures, or, I'm assuming we intend to use https://github.com/kubernetes-sigs/gateway-api/blob/d400a8b69ef19578d55896852b75d7d5e6f9a30c/pkg/features/features.go as the set of possible values while the field is in experimental. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 on having this map of struct with just the I +1 the plan stated above by Nick, with just a small nit: we already have all the features in a separate package, but we need to write appropriate go docs for all the features, as currently, they are mostly in the form of
Big +1 . Just listing the features is not enough. The addition of some metadata on the features is something fundamental in my opinion, to track the feature lifecycle and its implementation state. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Istio basically messed up by not having a feature flag for the old setting (like Envoy Gateway). This is the only field we have this issue on since its the only experimental write (not read) field.
So if this is merged, all users who upgrade to a newer GW API are going to get ~10 pages of error logs in Istio. I can understand its experimental and that may not factor in much, but just saying.
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.
I was about to leave a comment to that extent, asking about failure modes of existing controllers here. Does the failure become any less painful if we rename/remove the field as part of this transition?
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.
just to learn more, what do you mean old setting? the supportedFeatures API in its current form?
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.
I agree that it sucks that a breaking change will produce a bunch of errors, but it's the risk we all run when supporting experimental features.
Renaming the field would make things easier, but I can't think of a name that makes sense.