tczekajlo / kube-consul-register

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

True single namespace functionality #62

Open GoodOldJack12 opened 2 years ago

GoodOldJack12 commented 2 years ago

Updates the API version like #60

This change makes it possible to deploy consul-register in a single namespace without needing cluster-wide permissions. rolebinding.yaml contains the minimal permission set required for this setup. (watch doesn't seem to break all functionality, but the application does produce errors if its not present)

I'm not familiar with Go, so please check if I didn't accidentally break something.

shivamnarula commented 1 year ago

Why do we need this when we can use ClusterRoleBinding and that works?

GoodOldJack12 commented 1 year ago

Why do we need this when we can use ClusterRoleBinding and that works?

Because then it wouldn't be truly in a single name space. A good use case for this is multi-tenant setups where a tenant might not have cluster wise permissions.

Really, there's no reason to have a cluster role for this functionality.

This would also make this application have an advantage over the official consul solution, which can't be installed in a single namespace

shivamnarula commented 1 year ago

Why do we need this when we can use ClusterRoleBinding and that works?

Because then it wouldn't be truly in a single name space. A good use case for this is multi-tenant setups where a tenant might not have cluster wise permissions.

Really, there's no reason to have a cluster role for this functionality.

This would also make this application have an advantage over the official consul solution, which can't be installed in a single namespace

Understood. Thankyou!