ingress

package
v0.0.0-...-4234fb6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConcurrencyWatchdog

func NewConcurrencyWatchdog(manager ctrl.Manager, conf *config.Config, targets []*WatchdogTarget) error

func NewIngressClassReconciler

func NewIngressClassReconciler(manager ctrl.Manager, resources []client.Object, name string) error

NewIngressClassReconciler creates a reconciler that manages ingress class resources

func NewIngressControllerReconciler

func NewIngressControllerReconciler(manager ctrl.Manager, resources []client.Object, name string) error

NewIngressControllerReconciler creates a reconciler that manages ingress controller resources

func NginxScrapeFn

func NginxScrapeFn(ctx context.Context, client rest.Interface, pod *corev1.Pod) (float64, error)

NginxScrapeFn is the scrape function for Nginx

Types

type ConcurrencyWatchdog

type ConcurrencyWatchdog struct {
	// contains filtered or unexported fields
}

ConcurrencyWatchdog evicts ingress controller pods that have too many active connections relative to others. This helps redistribute long-running connections when the ingress controller scales up.

func (*ConcurrencyWatchdog) NeedLeaderElection

func (c *ConcurrencyWatchdog) NeedLeaderElection() bool

func (*ConcurrencyWatchdog) Start

func (c *ConcurrencyWatchdog) Start(ctx context.Context) error

type LabelGetter

type LabelGetter interface {
	PodLabels() map[string]string
}

LabelGetter returns unique pod labels for an Ingress controller

type ScrapeFn

type ScrapeFn func(ctx context.Context, client rest.Interface, pod *corev1.Pod) (float64, error)

ScrapeFn returns the connection count for the given pod

type WatchdogTarget

type WatchdogTarget struct {
	ScrapeFn ScrapeFn
	LabelGetter
}

WatchdogTarget refers to a target the concurrency watchdog should track

Jump to

Keyboard shortcuts

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