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

exportTo needs to support label selectors #50661

Open
NearchPasipou opened this issue Apr 24, 2024 · 2 comments
Open

exportTo needs to support label selectors #50661

NearchPasipou opened this issue Apr 24, 2024 · 2 comments

Comments

@NearchPasipou
Copy link

Describe the feature request

I need to exportTo resources to specific namespaces but without having to know those namespaces by name.

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: external-svc-httpbin
  namespace : egress
spec:
  hosts:
  - example.com
  exportTo: <--------------------
  - "."
  location: MESH_EXTERNAL
  ports:
  - number: 80
    name: http
    protocol: HTTP
  resolution: DNS

The issue is that this exportTo feature, as it seems, does not support label selectors.
So, while all namespaces with label:
mesh: enabled
belong to the service mesh / istio, there is no way to export resources to them unless I know all namespaces by name.

Which in my case is not possible since there are dynamically spawned preview environments (used for testing/developement) that each needs to join istio mesh and resides in a different namespace.

So, the use case here is, that I need to have resources exported in all istio enabled namespace and the name of all those istio enabled namespaces is not known beforehand.

I need to be able to exportTo the same way it is done with discovery selectors:

          discoverySelectors:
            - matchLabels:
                kubernetes.io/metadata.name: istio-system
            - matchLabels:
                mesh: enabled

Is something like this supported?
If not, shouldn't it be?

to make it more specific,

  1. there are some resources that need to be exported only to istio-system namespace
  2. some other resources that need to be exported to all those namespaces that are mesh enabled and I do not know their names beforehand (but NOT to be exported to the istio-system namespace)
  3. some resources that need to be exported to all those namespaces that are mesh enabled and I do not know their names beforehand AND istio-system

[X] Networking
[X] Performance and Scalability
[X] User Experience

@ekarak-upwork
Copy link

+1

@hzxuzhonghu
Copy link
Member

What is the sideeffect if you exportTo all namespaces for u? I think export to all istio managed namesapces equals to export to all namespaces, as for namespace not managed by istio, it has no effect at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants