Documentation
¶
Overview ¶
loadbalancer defines haproxy configuration that is used for the cluster load balancer. it is based on code from capd, with specific adjustments to work in LXC environments.
Index ¶
Constants ¶
View Source
const DefaultHaproxyTemplate = `` /* 1097-byte string literal not displayed */
DefaultHaproxyTemplate is the loadbalancer config template.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶ added in v0.6.1
type Manager interface {
// Create provisions the load balancer instance.
// Implementations can indicate non-retriable failures (e.g. because of Incus not having the required extensions).
// Callers must check these with utils.IsTerminalError() and treat them as terminal failures.
Create(context.Context) ([]string, error)
// Delete cleans up any load balancer resources.
Delete(context.Context) error
// Reconfigure updates the load balancer configuration based on the currently running control plane instances.
Reconfigure(context.Context) error
// Inspect returns a map[string]string of the current state of the load balancer infrastructure.
// It is mainly used by the E2E tests.
Inspect(context.Context) map[string]string
}
Manager can be used to interact with the cluster load balancer.
func ManagerForCluster ¶ added in v0.6.1
func ManagerForCluster(cluster *clusterv1.Cluster, lxcCluster *infrav1.LXCCluster, lxcClient *lxc.Client) Manager
ManagerForCluster returns the proper LoadBalancerManager based on the lxcCluster spec.
Click to show internal directories.
Click to hide internal directories.