microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

Support headless services #117

Open WolfspiritM opened 3 years ago

WolfspiritM commented 3 years ago

Is your feature request related to a problem? Please describe. Currently we're hosting multiple headless services in the cluster. We'd like to use Bridge to Kubernetes to access these services. It seems like Bridge to Kubernetes is not able to make headless services available locally.

Describe the solution you'd like

version: 0.1
env:
  - name: Kafka__Broker
    value: PLAINTEXT://$(services:kafka.shared):9092
  - name: Kafka__Services
    value: $(services:kafka-headless.shared)

This should create hosts for the kafka.shared service and also hosts for all of the available headless services under kafka-headless.shared. For example:

127.1.1.126 kafka-2.kafka-headless.shared
127.1.1.125 kafka-1.kafka-headless.shared
127.1.1.124 kafka.shared

Right now it creates the follow host file:

127.1.1.125 kafka-headless.shared
127.1.1.124 kafka.shared

Which won't work.

The environment variable could then maybe contain a comma seperated list of all the headless services

daniv-msft commented 3 years ago

Thanks @WolfspiritM for opening this issue. I confirm that providing support for headless services is in our backlog. This requires more investigations on our side, and I'm bumping the priority of this work item on our side.