tczekajlo / kube-consul-register

a tool to register Kubernetes PODs as Consul Services
Apache License 2.0
105 stars 50 forks source link

Multi container pod #11

Closed rmazlumyan closed 7 years ago

rmazlumyan commented 7 years ago

Is there a way of specifying which container to register if i have a multi-container pod where both containers have ports defined and I only want one of those containers to register in consul ?

tczekajlo commented 7 years ago

No, there isn't, but such option seems to be a quite easy to implement. I'll take a look at it in spare time.

tczekajlo commented 7 years ago

In #13 I've added the ability to choose which container should be registered in the case when POD contains multi containers. I hope it will help.

In order to say which container you want to register you have to use consul.register/pod.container.name annotations. Here you can find the example how to use it.

rmazlumyan commented 7 years ago

@tczekajlo thanks for putting this feature so quickly. Looking forward to trying it out. Do you mind building a new docker image w/ the fix and pushing up a repository. Didn't see it at https://hub.docker.com/r/tczekajlo/kube-consul-register/tags/

tczekajlo commented 7 years ago

Sure. The new image is available on Docker Hub.