8000 l7mp-operator: Support inline Target definitions in VirtualService objects · Issue #85 · l7mp/l7mp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

l7mp-operator: Support inline Target definitions in VirtualService objects #85

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

Open
rg0now opened this issue Oct 8, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request wishlist Feature request

Comments

@rg0now
Copy link
Member
rg0now commented Oct 8, 2020

Currently there is no way to specify a Target selector in the case when a Target is created inline inside a VirtualService.

In particular, the below example to route DNS requests to a my-dns service should work:

kind: VirtualService
metadata:
  name: dns-gateway
  namespace: default
spec:
  selector:
    matchService: l7mp-ingress
  listener:
    spec:
      UDP:
        port: 5053
    rules:
      - action:
          route:
            destination:
              cluster:
                spec:
                  UDP:
                    port: 53
              selector:
                matchService: my-dns

Unfortunately, this is now rejected since the OpenAPI schema requires the route.destination property to contain a Cluster but this does not allow a the target service selector to be defined:

   ... 
     properties:
       ....
        destination:
          $ref: '#/components/schemas/Cluster'

Instead, the route.destination should point to a Target, which specifies its own target selector:

   ... 
     properties:
       ....
        destination:
          $ref: '#/components/schemas/Target'

A workaround exists: simply specify a separate Target, say, my-dns-target and then let the VirtualService route refer to this Target but this superfluously complicates the mesh config:

kind: VirtualService
metadata:
  name: dns-gateway
  namespace: default
spec:
  selector:
    matchService: l7mp-ingress
  listener:
    spec:
      UDP:
        port: 5053
    rules:
      - action:
          route:
            destinationRef: my-dns-target

Please, fix.

@rg0now rg0now added enhancement New feature or request wishlist Feature request labels Oct 8, 2020
@rg0now rg0now assigned rg0now and nemethf and unassigned rg0now Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wishlist Feature request
Projects
None yet
Development

No branches or pull requests

2 participants
0