control

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName              = "clusterlink.net"
	LabelManagedBy       = "app.kubernetes.io/managed-by"
	LabelImportName      = "clusterlink.net/import-name"
	LabelImportNamespace = "clusterlink.net/import-namespace"
)

Variables

This section is empty.

Functions

func CreateControllers

func CreateControllers(mgr *Manager, controllerManager ctrl.Manager) error

CreateControllers creates the various k8s controllers used to update the control manager.

func SystemServiceName added in v0.1.0

func SystemServiceName(name types.NamespacedName) string

Types

type Manager

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

Manager is responsible for handling control operations, which needs to be coordinated across all dataplane/controlplane instances. This includes target port generation for imported services, as well as k8s service creation per imported service.

func NewManager

func NewManager(cl client.Client, peerTLS *tls.ParsedCertData, namespace string, crdMode bool) *Manager

NewManager returns a new control manager.

func (*Manager) AddImport

func (m *Manager) AddImport(ctx context.Context, imp *v1alpha1.Import) (err error)

AddImport adds a listening socket for an imported remote service.

func (*Manager) AddPeer

func (m *Manager) AddPeer(pr *v1alpha1.Peer)

AddPeer defines a new route target for egress dataplane connections.

func (*Manager) DeleteImport

func (m *Manager) DeleteImport(ctx context.Context, name types.NamespacedName) error

DeleteImport removes the listening socket of a previously imported service.

func (*Manager) DeletePeer

func (m *Manager) DeletePeer(name string)

DeletePeer removes the possibility for egress dataplane connections to be routed to a given peer.

func (*Manager) GracefulStop

func (m *Manager) GracefulStop() error

GracefulStop does a graceful stop of the peer manager.

func (*Manager) Name

func (m *Manager) Name() string

Name of the peer monitor runnable.

func (*Manager) SetStatusCallback

func (m *Manager) SetStatusCallback(callback func(*v1alpha1.Peer))

func (*Manager) Start

func (m *Manager) Start() error

Start the peer manager.

func (*Manager) Stop

func (m *Manager) Stop() error

Stop the peer manager.

Jump to

Keyboard shortcuts

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