Skip to content

Fetch Load Balancer type from API and warn customers about unset annotation #1300

Description

@lukasmetzner

TL;DR

load_balancer_type is a required property in the POST /v1/load_balancers endpoint. We have a hard coded default to lb11. This will lead to issues if the type is ever deprecated and eventually removed.

opts := hcloud.LoadBalancerCreateOpts{
Name: lbName,
LoadBalancerType: &hcloud.LoadBalancerType{Name: "lb11"},
Labels: map[string]string{
LabelServiceUID: string(svc.ObjectMeta.UID),
},
}

Expected behavior

Requiring the user to set the load-balancer.hetzner.cloud/type annotation would be a breaking change we could perform in a v2.

Right now, we can fetch the default from the API and warn users with a log message and a Kubernetes event to set the load-balancer.hetzner.cloud/type annotation.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions