loadbalancer

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package loadbalancer contains external loadbalancer related constants and configuration. This package was originally forked from the kind load balancer at https://github.com/kubernetes-sigs/kind/tree/v0.7.0/pkg/cluster/internal/loadbalancer

Index

Constants

View Source
const (
	// Image is the loadbalancer image name.
	Image = "haproxy"

	// DefaultImageRepository is the loadbalancer image repository.
	DefaultImageRepository = "kindest"

	// DefaultImageTag is the loadbalancer image tag.
	DefaultImageTag = "v20230510-486859a6"

	// ConfigPath is the path to the config file in the image.
	ConfigPath = "/usr/local/etc/haproxy/haproxy.cfg"
)
View Source
const DefaultTemplate = `` /* 1003-byte string literal not displayed */

DefaultTemplate is the loadbalancer config template.

Variables

This section is empty.

Functions

func Config

func Config(data *ConfigData, configTemplate string) (config string, err error)

Config generates the loadbalancer config from the ConfigTemplate and ConfigData.

Types

type ConfigData

type ConfigData struct {
	FrontendControlPlanePort string
	BackendControlPlanePort  string
	BackendServers           map[string]string
	IPv6                     bool
}

ConfigData is supplied to the loadbalancer config template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL