controller

package
v0.71.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0, MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.18.0

type Config struct {
	// DefaultBackendService is the default backend service name.  It must be specified if InternalDefaultBackend == false.
	DefaultBackendService *types.NamespacedName
	// WatchNamespace is the namespace to watch for Ingress resource updates.
	WatchNamespace string
	// NghttpxConfigMap is the name of ConfigMap resource which contains additional configuration for nghttpx.
	NghttpxConfigMap *types.NamespacedName
	// NghttpxHealthPort is the port for nghttpx health monitor endpoint.
	NghttpxHealthPort int32
	// NghttpxAPIPort is the port for nghttpx API endpoint.
	NghttpxAPIPort int32
	// NghttpxConfDir is the directory which contains nghttpx configuration files.
	NghttpxConfDir string
	// NghttpxExecPath is a path to nghttpx executable.
	NghttpxExecPath string
	// NghttpxHTTPPort is a port to listen to for HTTP (non-TLS) requests.
	NghttpxHTTPPort int32
	// NghttpxHTTPSPort is a port to listen to for HTTPS (TLS) requests.
	NghttpxHTTPSPort int32
	// NghttpxWorkers is the number of nghttpx worker threads.
	NghttpxWorkers int32
	// NghttpxWorkerProcessGraceShutdownPeriod is the maximum period for an nghttpx worker process to terminate gracefully.
	NghttpxWorkerProcessGraceShutdownPeriod time.Duration
	// NghttpxMaxWorkerProcesses is the maximum number of nghttpx worker processes which are spawned in every configuration reload.
	NghttpxMaxWorkerProcesses int32
	// NghttpxSecret is the Secret resource which contains secrets used by nghttpx.
	NghttpxSecret types.NamespacedName
	// DefaultTLSSecret is the default TLS Secret to enable TLS by default.
	DefaultTLSSecret *types.NamespacedName
	// IngressClassController is the name of IngressClass controller for this controller.
	IngressClassController  string
	AllowInternalIP         bool
	OCSPRespKey             string
	FetchOCSPRespFromSecret bool
	// ProxyProto toggles the use of PROXY protocol for all public-facing frontends.
	ProxyProto bool
	// PublishService is a namespace/name of Service whose addresses are written in Ingress resource instead of addresses of Ingress
	// controller Pod.
	PublishService *types.NamespacedName
	// ReloadRate is a rate (QPS) of reloading nghttpx configuration.
	ReloadRate float64
	// ReloadBurst is the number of reload burst that can exceed ReloadRate.
	ReloadBurst int
	// NoDefaultBackendOverride, if set to true, ignores settings or rules in Ingress resource which override default backend service.
	NoDefaultBackendOverride bool
	// DeferredShutdownPeriod is a period before the controller starts shutting down when it receives shutdown signal.
	DeferredShutdownPeriod time.Duration
	// HealthzPort is a port for healthz endpoint.
	HealthzPort int32
	// InternalDefaultBackend, if true, instructs the controller to use internal default backend instead of an external one.
	InternalDefaultBackend bool
	// HTTP3, if true, enables HTTP/3.
	HTTP3 bool
	// ShareTLSTicketKey, if true, shares TLS ticket key among ingress controllers via Secret.
	ShareTLSTicketKey bool
	// ReconcileTimeout is a timeout for a single reconciliation.  It is a safe guard to prevent a reconciliation from getting stuck
	// indefinitely.
	ReconcileTimeout time.Duration
	// LeaderElectionConfig is the configuration of leader election.
	LeaderElectionConfig componentbaseconfig.LeaderElectionConfiguration
	// RequireIngressClass, if set to true, ignores Ingress resource which does not specify .spec.ingressClassName.
	RequireIngressClass bool
	// TLSTicketKeyPeriod is the duration before TLS ticket keys are rotated and new key is generated.
	TLSTicketKeyPeriod time.Duration
	// QUICSecretPeriod is the duration before QUIC keying materials are rotated and new key is generated.
	QUICSecretPeriod time.Duration
	// GatewayAPI, if true, enables Gateway API.
	GatewayAPI bool
	// GatewayClassController is the name of GatewayClass controller for this controller.
	GatewayClassController gatewayv1.GatewayController
	// Pod is the Pod where this controller runs.
	Pod *corev1.Pod
	// EventRecorder is the event recorder.
	EventRecorder events.EventRecorder
}

type LeaderController added in v0.55.0

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

LeaderController is operated by leader. It is started when a controller gains leadership, and stopped when it is lost.

func NewLeaderController added in v0.55.0

func NewLeaderController(ctx context.Context, lbc *LoadBalancerController) (*LeaderController, error)

func (*LeaderController) Run added in v0.55.0

func (lc *LeaderController) Run(ctx context.Context) error

type LoadBalancerController

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

LoadBalancerController watches the kubernetes api and adds/removes services from the loadbalancer

func NewLoadBalancerController

func NewLoadBalancerController(ctx context.Context, clientset clientset.Interface, gatewayClientset gatewayclientset.Interface,
	nghttpx serverReloader, config Config) (*LoadBalancerController, error)

NewLoadBalancerController creates a controller for nghttpx loadbalancer

func (*LoadBalancerController) Run

func (lbc *LoadBalancerController) Run(ctx context.Context)

Run starts the loadbalancer controller.

func (*LoadBalancerController) ShutdownCommenced added in v0.49.0

func (lbc *LoadBalancerController) ShutdownCommenced() bool

ShutdownCommenced returns true if the controller is shutting down. This includes deferred shutdown period.

Jump to

Keyboard shortcuts

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