-
Notifications
You must be signed in to change notification settings - Fork 24
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
Redefined Gateway API Types #115
Comments
cc: @robscott |
Good catch, thanks @danehans! The goal here was to add some defaults here so 99% of users would only need to specify a name, similar to how BackendRef works in Gateway API. Those have been added now, so hopefully it makes a bit more sense: gateway-api-inference-extension/api/v1alpha1/inferencemodel_types.go Lines 71 to 89 in 60bab3a
|
@robscott thanks for the feedback. Even with defaults and validation added to the API fields, I'm trying to understand why concrete types are used here. In contrast, alias types are used in Gateway API object reference types. For example |
@danehans Got it, somehow I completely missed that part of the difference. Agree that it would make sense to reuse gwv1.Group, Kind, and ObjectName types, thanks for catching this! |
My worry is about creating an unnecessary dependency on the gateway api pkg types. The group/kind of resources are not a gateway concept, they are a k8s one, and there they are just defined as strings: https://github.com/kubernetes/kubernetes/blob/6746df77f2376c6bc1fd0de767d2a94e6bd6cec1/pkg/apis/core/types.go#L5750. |
I think it's fair to not not create Gateway API dependencies. Maybe this should be documented somewhere to help guide API development for the project. Thoughts? |
Yeah, that's a good idea, I'll try to add that into the developer guide in #129. |
Currently, gateway-api-inference-extension defines API types that exist in Gateway API. For example:
Gateway API defines custom alias types for
Group
,Kind
, andName
. For consistency, should these types be imported and used instead of redefining them as opaque strings? For example:The text was updated successfully, but these errors were encountered: