reconciler

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright Authors of Cilium

Index

Constants

View Source
const (
	// WildcardProtoNumber is basically IPPROTO_ANY
	WildcardProtoNumber u8proto.U8proto = u8proto.ANY

	// WildcardPortNumber is a zero destination port number
	WildcardPortNumber uint16 = 0
)

Variables

View Source
var Cell = cell.Module(
	"loadbalancer-reconciler",
	"Load-balancing BPF map reconciliation",

	cell.Provide(

		newBPFOps,

		scriptCommands,
	),

	cell.ProvidePrivate(
		newBPFReconciler,
	),

	cell.Invoke(

		func(promise.Promise[reconciler.Reconciler[*loadbalancer.Frontend]]) {},
	),

	SocketTerminationCell,
)

Load-balancing tables to BPF map reconciliation.

Reconciles changes in Table[*Frontend] to the BPF maps.

View Source
var SocketTerminationCell = cell.Module(
	"socket-termination",
	"Terminates sockets connected to deleted backends",

	cell.ProvidePrivate(
		func() netnsOps {
			return netnsOps{
				current: netns.Current,
				do:      (*netns.NetNS).Do,
				all:     netns.All,
			}
		},
		func() socketDestroyerFactory {
			return makeSocketDestroyer
		},
	),

	cell.Invoke(registerSocketTermination),
)

SocketTerminationCell runs a background job that monitors the backends table for unhealthy and deleted backends and terminates UDP & TCP sockets connected to these backends to signal to the application that the destination has become unreachable.

Functions

This section is empty.

Types

type BPFOps

type BPFOps struct {
	LBMaps maps.LBMaps
	// contains filtered or unexported fields
}

func (*BPFOps) Delete

Delete implements reconciler.Operations.

func (*BPFOps) GetLastUpdatedAt

func (ops *BPFOps) GetLastUpdatedAt() time.Time

func (*BPFOps) Prune

Prune implements reconciler.Operations.

func (*BPFOps) ResetAndRestore

func (ops *BPFOps) ResetAndRestore() (err error)

func (*BPFOps) StateIsEmpty

func (ops *BPFOps) StateIsEmpty() bool

func (*BPFOps) StateSummary

func (ops *BPFOps) StateSummary() string

StateSummary returns a multi-line summary of the internal state. Used in tests.

func (*BPFOps) Update

Update implements reconciler.Operations.

Jump to

Keyboard shortcuts

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