cloudwatt / kube2consul

GNU General Public License v3.0
3 stars 12 forks source link

Feature request : Kube Labels -> Consul Tags sync #4

Open BarthV opened 7 years ago

BarthV commented 7 years ago

Hi !

Since Annotations are not available in Endpoints metadata, I suggest using only label for this case. This is 2 kinds of possible consul tags :

kube2consul should support both :)

I made a very quick-and-dirty working proof of concept here : https://github.com/BarthV/kube2consul/tree/using-labels

This is what I'm thinking about :

apiVersion: v1
kind: Service
metadata:
  name: my-service-01
  namespace: myservices
  labels:
    k2c-singletags: mytag_secondtag
    foo: bar
    cluster: acme
spec:
[...]

It's also possible to add a "flag" label that would enable/disable this feature to optimize perfs

Thanks !

aevox commented 7 years ago

Hello,

This is a good idea, we were actually thinking about doing this! I'll look into it.