Help us shape the future of Go! Take the 2026 Go Developer Survey

haproxy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelManagedBy  = common.LabelManagedBy
	LabelPartOf     = common.LabelPartOf
	LabelApp        = "app"
	ManagedByValue  = common.ManagedByValue
	PartOfHAProxy   = "haproxy"
	ConfigMapSuffix = "-config"
	DefaultImage    = "haproxy:2.8.10-alpine3.20"
)
View Source
const (
	ConfigVolumeName = "config"
	ConfigMountPath  = "/usr/local/etc/haproxy/haproxy.cfg"
	ConfigFileName   = "haproxy.cfg"
	TLSVolumeName    = "tls-secrets"
	TLSMountPath     = "/etc/haproxy/certs"
	ContainerName    = "haproxy"
)

Volume and mount paths

View Source
const (
	DefaultMetricsPort = int32(9090)
)
View Source
const (
	ReasonTemplateFailed errx.Reason = "TemplateExecutionFailed"
)

Variables

This section is empty.

Functions

func CommonLabels

func CommonLabels(haproxy *operatorv1alpha1.HAProxyCapsule) map[string]string

CommonLabels returns the pod selector labels. These must remain stable — never include AdditionalLabels here.

func ConfigMapName

func ConfigMapName(haproxy *operatorv1alpha1.HAProxyCapsule) string

func GetGrpcPort

func GetGrpcPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32

func GetGrpcsPort

func GetGrpcsPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32

func GetImage

func GetImage(haproxy *operatorv1alpha1.HAProxyCapsule) string

func GetMetricsPort

func GetMetricsPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32

func GetUpstreamService

func GetUpstreamService(haproxy *operatorv1alpha1.HAProxyCapsule) string

GetUpstreamService strips the "haproxy-" prefix from the CR name when UpstreamService is not set.

func HAProxyConfig

func HAProxyConfig(haproxy *operatorv1alpha1.HAProxyCapsule) (string, error)

func ResourceLabels

func ResourceLabels(haproxy *operatorv1alpha1.HAProxyCapsule) map[string]string

ResourceLabels merges CommonLabels with AdditionalLabels. Use on ObjectMeta and pod template, not selectors.

Types

type ConfigMapSubReconciler

type ConfigMapSubReconciler struct {
	*subreconciler.BaseSubReconciler[*operatorv1alpha1.HAProxyCapsule]
}

ConfigMapSubReconciler manages the ConfigMap for an HAProxyCapsule

func NewConfigMapSubReconciler

func NewConfigMapSubReconciler(c client.Client, scheme *runtime.Scheme) *ConfigMapSubReconciler

NewConfigMapSubReconciler creates a new ConfigMapSubReconciler

func (*ConfigMapSubReconciler) Reconcile

Reconcile ensures the config map exists and is up to date

type DeploymentSubReconciler

type DeploymentSubReconciler struct {
	*subreconciler.BaseSubReconciler[*operatorv1alpha1.HAProxyCapsule]
}

func NewDeploymentSubReconciler

func NewDeploymentSubReconciler(c client.Client, scheme *runtime.Scheme) *DeploymentSubReconciler

func (*DeploymentSubReconciler) Reconcile

type IngressSubReconciler

type IngressSubReconciler struct {
	*subreconciler.BaseSubReconciler[*operatorv1alpha1.HAProxyCapsule]
}

IngressSubReconciler manages the Ingress for an HAProxyCapsule when ServiceType is Ingress

func NewIngressSubReconciler

func NewIngressSubReconciler(c client.Client, scheme *runtime.Scheme) *IngressSubReconciler

NewIngressSubReconciler creates a new IngressSubReconciler

func (*IngressSubReconciler) Reconcile

type ServiceSubReconciler

type ServiceSubReconciler struct {
	*subreconciler.BaseSubReconciler[*operatorv1alpha1.HAProxyCapsule]
}

ServiceSubReconciler manages the Service for an HAProxyCapsule

func NewServiceSubReconciler

func NewServiceSubReconciler(c client.Client, scheme *runtime.Scheme) *ServiceSubReconciler

NewServiceSubReconciler creates a new ServiceSubReconciler

func (*ServiceSubReconciler) Reconcile

Reconcile ensures the service exists and is up to date

Jump to

Keyboard shortcuts

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