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
k8s gateway extensions: allow customizing translator #9471
base: main
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit 93867d8): https://gloo-edge--pr9471-stevenctl-allow-cust-x18vicvf.web.app (expires Thu, 30 May 2024 20:44:07 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 77c2b86e287749579b7ff9cadb81e099042ef677 |
// GetEnvoyImage returns the envoy image and tag used by the proxy deployment. | ||
// GetTranslator allows an extnsion to provide custom translation for | ||
// different gateway classes. | ||
GetTranslator(*apiv1.Gateway) translator.K8sGwTranslator |
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.
should this take in the GatewayClass instead?
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.
It leaves some flexibility to look at labels/annotations if needed. I'm not sure further restricting it gives much of an advantage.
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.
Changes LGTM, just want confirmation about the registry creation semantics for portal
// CreatePluginRegistry returns the PluginRegistry | ||
CreatePluginRegistry(ctx context.Context) registry.PluginRegistry | ||
// GetPluginRegistry exposes the plugins supported by this implementation. | ||
GetPluginRegistry() registry.PluginRegistry |
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.
@jmhbh or @ilackarms would know better if this needs to be created every time, I don't think so but I defer to them.
Description
API changes
The only API is an internal code API to allow GME to take control of the Gateway translation.
Changed
CreatePluginRegistry
toGetPluginRegistry
. AFAICT there is no need to recreate the registry each time but I can rever tthis if needed.Added:
GetTranslator
to allow conditionally switching the translation logic based on the type of gateway.Context
See slack conversation here