cbeneke / hcloud-fip-controller

Kubernetes controller to (re-)assign floating IPs on hetzner cloud instances
Apache License 2.0
123 stars 14 forks source link

nodes filtering by labels #31

Closed nejtr0n closed 4 years ago

nejtr0n commented 4 years ago

Is there any way to select only nodes with special labels to assign floating ip. I have 3 nodes, but I want to assign IP only for two of them (which are in A dns entry)

cbeneke commented 4 years ago

Hi,

the controller will only assign the IP to the node it is currently running on. So you can use a nodeSelector on the deployment to pin it to a specific (set of) node(s).

If you have a different set of nodes you want your IP to be attached to for different IPs you (currently) have to create multiple deployments having a different nodeSelector and make each deployment responsible for only a subset of IPs.

E.g. I am currently running one controller for my API IP and one for my Ingress IPs :)

nejtr0n commented 4 years ago

Great! Thank ypu very much. I didn’t realize that it’s possible!