syself / cluster-api-provider-hetzner

Cluster API Provider Hetzner :rocket: The best way to manage Kubernetes clusters on Hetzner, fully declarative, Kubernetes-native and with self-healing capabilities
https://caph.syself.com
Apache License 2.0
693 stars 61 forks source link

Customize LoadBalancer Name #1161

Open simonostendorf opened 9 months ago

simonostendorf commented 9 months ago

/kind feature

Describe the solution you'd like I would like to name the API Server LoadBalancer using my own naming scheme instead of the default one. The reason for this is that I name all my LBs according to a DNS scheme (e.g. the API Server LB would be named "api..", as the Ingress LBs would be named "ingress..". This means that all resources follow the same naming scheme. Is there a reason why the LBs are given a generated name (see https://github.com/syself/cluster-api-provider-hetzner/blob/main/pkg/services/hcloud/loadbalancer/loadbalancer.go#L312)?

Anything else you would like to add: none

Environment:

janiskemper commented 9 months ago

There is a feature to own existing load balancers, see https://github.com/syself/cluster-api-provider-hetzner/blob/main/pkg/services/hcloud/loadbalancer/loadbalancer.go#L73.

This currently works by specifying the name of the load balancer.

This would somehow have to be changed if we want to implement this!

simonostendorf commented 9 months ago

This would somehow have to be changed if we want to implement this!

Don't know if other users are interested in this feature. Changing this behavior would be a breaking change which is not what I want :D

janiskemper commented 9 months ago

not necessarily breaking if we add a new property in the spec, but at least a bit ugly since we will have somehow two names, one for existing load balancers, one for naming a new one :sweat_smile:

We can maybe monitor whether people give :+1: for this feature and think whether this is worth implementing!

guettli commented 3 months ago

@simonostendorf sorry for the late reply. Are you still interested in this feature?

If not, please elaborate: Did you find a work-around?

simonostendorf commented 3 months ago

@simonostendorf sorry for the late reply. Are you still interested in this feature?

If not, please elaborate: Did you find a work-around?

Would be a cool feature, yes. I am still interested.