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

Redesign ServiceExport spec #592

Open
solmonk opened this issue Jan 24, 2024 · 0 comments
Open

Redesign ServiceExport spec #592

solmonk opened this issue Jan 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@solmonk
Copy link
Contributor

solmonk commented Jan 24, 2024

An extension of #365

The controller is not yet allowing exporting TG for use in routes other than HTTPRoute. As more route types (TLSRoute, TCPRoutes, and more) are coming, we need a fundamental solution to support all route types.

An original suggestion was to create all types of target groups when exported - but it is technically a waste of resource, and actually not compatible with common use cases.

For example, let's say a service has 2 exported ports - 80 serves plaintext HTTP, and 8081 serves GRPC.

To support all types of traffic we need 2 different types of target groups to be attached to 2 different routes.

Now that we have our own ServiceExport spec, we could define something like this on ServiceExport, and be explicit on which target groups are to be exported:

spec:
  exportedPorts:
  - port: 80 # this is equivalent to backendref port
    routeType: HTTP
  - port: 8081
    routeType: GRPC

The following behavior is required:

  • For each exported port, create target group to be used with relevant route type
  • When importing service, backendRef port must match the exported port.
  • For backwards compatibility, keep the old behavior when no exportedPort is defined (export all ports to HTTP target group.)
@solmonk solmonk added the enhancement New feature or request label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant