Closed mlamina closed 8 years ago
This is great thanks @mlamina !
I agree and I was thinking the same thing how we are can start allowing custom configuration and choice on how to do InstanceDiscovery. At the moment it feels pretty clunky to have to build a custom build in order to register your own InstanceDiscovery mechanism.
The way that Turbine does it at the moment is via reflection and you just specify your InstanceDiscovery class by a System.property. Perhaps we can do something similar with Breakerbox, but more Dropwizard style. If you have any thoughts feel free to submit them :-)
I created a class which will detect Kubernetes pods that are annotated with 'breakerbox-port'. This has two advantages:
It will cluster the instances with a combination of the namespace and the pod's base name and use the pod's IP address as the host name. However, I am unsure how to properly integrate it into the breakerbox service without breaking existing configurations.