-
Notifications
You must be signed in to change notification settings - Fork 630
static backend app protocol #11384
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
static backend app protocol #11384
Conversation
Signed-off-by: Jenny Shu <[email protected]>
| } | ||
|
|
||
| // AppProtocol defines the application protocol to use when communicating with the backend. | ||
| // +kubebuilder:validation:Enum=http2;grpc;grpc-web;kubernetes.io/h2c;kubernetes.io/ws |
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.
not sure if we want to be restrictive here or just allow any string
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.
makes sense to restrict. is there a reason a user would have an arbitrary string?
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.
is there a reason a user would have an arbitrary string?
reasons for allowing any string:
- k8s Service allows any string
- they might be using protocols that we don't explicitly handle
reasons for using enum:
- it spells out the protocols that we explicitly support
- anything else would map to the same 'default' protocol which is effectively the same as leaving it blank
Signed-off-by: Jenny Shu <[email protected]>
| // +optional | ||
| // +kubebuilder:validation:Optional |
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.
do you need both lines?
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.
hmm not sure, in some other places we are using both as well. i'll try removing one and see if it makes a difference
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.
so it seems they are redundant, but i think i want to do a pass in a separate PR to clean up all the kubebuilder markers (i noticed typos in some of them)
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| apiVersion: gateway.kgateway.dev/v1alpha1 |
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.
why was the service replace with backend? should we have both?
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.
good question. i previously had 6 translator tests (Service with each appProtocol+default). now we support the same thing with Backends, and i thought having a new translator test for each app protocol was overkill, so i've changed it to have 3 tests each for Service and Backend (http2, ws, default), and i added unit tests in pkg/pluginsdk/ir/backend_test.go to test the parsing of all the various protocols
Description
Allow configuring app protocol on Static Backends.
Fixes #10622
Change Type
/kind new_feature
Changelog
Additional Notes