d2iq-archive / mesos-dns

DNS-based service discovery for Mesos.
https://mesosphere.github.com/mesos-dns
Apache License 2.0
483 stars 137 forks source link

support for plugins #62

Open jdef opened 9 years ago

jdef commented 9 years ago

I'm thinking of how I might bridge kubernetes service discovery and mesos service discovery. Part of a solution might be a mesos-dns "plugin" that watches the kubernetes service registry and manages DNS records for kubernetes services inside mesos-dns (so that mesos tasks using mesos-dns services for resolution can also see kubernetes services). The other half of a solution might be an additional kubernetes service endpoint controller that watches mesos tasks (like mesos-dns does) and manages kubernetes endpoint records (so that kubernetes pods can find mesos services hosted by other frameworks).

Any thoughts re: a plugin model?

timothysc commented 9 years ago

It would be a Mesos-plugin to SkyDNS, or it would be a plugin to k8's to report up to Mesos. I'm guessing the former makes the most sense.

kozyraki commented 9 years ago

Great idea James. There are probably multiple ways to do this, but here is one, assuming K8S runs on top of Mesos:

If K8S runs next to Mesos, the cleanest solution is to probably extend Mesos-DNS to be able to talk to other controllers (not just the Mesos master).

I'd be glad to get on a hangout an talk about the details of this soon.

jdef commented 9 years ago

xref'ing https://github.com/mesosphere/kubernetes-mesos/issues/126

kozyraki commented 9 years ago

Other than K8S, what other systems do we want Mesos-DNS to interface with? This is useful in deciding how to proceed with plugins or other interfaces.

tsenart commented 9 years ago

As far as I can tell, if K8S would provide enough discovery info, there'd be no need for a plugin system. Am I missing something?

tsenart commented 9 years ago

/cc @jdef

jdef commented 9 years ago

TL;DR: yes we still want plugins.

Eventually we want to advertise k8s services in mesos-dns. DiscoveryInfo is relevant for mesos tasks. There's no way to represent a k8s service in mesos via tasks since they're decoupled in k8s.

tsenart commented 9 years ago

@jdef: Thanks for the info, makes sense.

Now, I have some ideas and intuition that tell me all mesos-dns data sources should be modelled the exact same way, with a lean, well defined streaming interface (with channels). If we're going down the path of having different data sources, I don't see why mesos state should be treated in a special way.

tsenart commented 9 years ago

Also, that wasn't long enough to warrant a TL;DR :D

jdef commented 9 years ago

agreed, data sources should be modeled the same way. my last "v2" proposal did just that.

tsenart commented 9 years ago

@jdef: Great! I should have a proposal for our contribution process out today. This issue would be a great candidate to test the process. :-)

jdef commented 9 years ago

FWIW, I was going write a much longer response earlier, hence the TL;DR :p Chalk it up to a caffeine shortage in the editing room.