Skip to content
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

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

stevenctl
Copy link
Contributor

Description

API changes

The only API is an internal code API to allow GME to take control of the Gateway translation.

Changed CreatePluginRegistry to GetPluginRegistry. AFAICT there is no need to recreate the registry each time but I can rever tthis if needed.

	// GetPluginRegistry exposes the plugins supported by this implementation.
	GetPluginRegistry() registry.PluginRegistry

Added: GetTranslator to allow conditionally switching the translation logic based on the type of gateway.

	// GetTranslator allows an extnsion to provide custom translation for
	// different gateway classes.
	GetTranslator(*apiv1.Gateway) translator.K8sGwTranslator

Context

See slack conversation here

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [] I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label May 9, 2024
Copy link

github-actions bot commented May 9, 2024

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

@stevenctl stevenctl mentioned this pull request May 14, 2024
3 tasks
// 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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Member

@EItanya EItanya left a 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
Copy link
Member

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.

EItanya
EItanya previously approved these changes May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants