Documentation
¶
Index ¶
- Constants
- func CommonLabels(haproxy *operatorv1alpha1.HAProxyCapsule) map[string]string
- func ConfigMapName(haproxy *operatorv1alpha1.HAProxyCapsule) string
- func DefaultHealthCheck() operatorv1alpha1.HAProxyHealthCheckSpec
- func GetGrpcPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32
- func GetGrpcsPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32
- func GetHealthCheck(haproxy *operatorv1alpha1.HAProxyCapsule) operatorv1alpha1.HAProxyHealthCheckSpec
- func GetImage(haproxy *operatorv1alpha1.HAProxyCapsule) string
- func GetMetricsPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32
- func GetUpstreamService(haproxy *operatorv1alpha1.HAProxyCapsule) string
- func HAProxyConfig(haproxy *operatorv1alpha1.HAProxyCapsule) (string, error)
- func NewSubReconcilers(c client.Client, scheme *runtime.Scheme) *subreconciler.Chain[*operatorv1alpha1.HAProxyCapsule]
- func ResourceLabels(haproxy *operatorv1alpha1.HAProxyCapsule) map[string]string
- type ConfigMapSubReconciler
- type DeploymentSubReconciler
- type IngressSubReconciler
- type ServiceSubReconciler
Constants ¶
const ( LabelManagedBy = common.LabelManagedBy LabelPartOf = common.LabelPartOf LabelApp = "app" ManagedByValue = common.ManagedByValue PartOfHAProxy = "haproxy" ConfigMapSuffix = "-config" DefaultImage = "haproxy:2.8.10-alpine3.20" )
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
const (
DefaultMetricsPort = int32(9090)
)
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 DefaultHealthCheck ¶
func DefaultHealthCheck() operatorv1alpha1.HAProxyHealthCheckSpec
func GetGrpcPort ¶
func GetGrpcPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32
func GetGrpcsPort ¶
func GetGrpcsPort(haproxy *operatorv1alpha1.HAProxyCapsule) int32
func GetHealthCheck ¶
func GetHealthCheck(haproxy *operatorv1alpha1.HAProxyCapsule) operatorv1alpha1.HAProxyHealthCheckSpec
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 NewSubReconcilers ¶
func NewSubReconcilers(c client.Client, scheme *runtime.Scheme) *subreconciler.Chain[*operatorv1alpha1.HAProxyCapsule]
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 ¶
func (r *ConfigMapSubReconciler) Reconcile(ctx context.Context, haproxy *operatorv1alpha1.HAProxyCapsule) (ctrl.Result, error)
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 ¶
func (r *DeploymentSubReconciler) Reconcile(ctx context.Context, haproxy *operatorv1alpha1.HAProxyCapsule) (ctrl.Result, error)
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 ¶
func (r *IngressSubReconciler) Reconcile(ctx context.Context, haproxy *operatorv1alpha1.HAProxyCapsule) (ctrl.Result, error)
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 ¶
func (r *ServiceSubReconciler) Reconcile(ctx context.Context, haproxy *operatorv1alpha1.HAProxyCapsule) (ctrl.Result, error)
Reconcile ensures the service exists and is up to date