controllers

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package controllers contains the controllers for the webmesh-cni.

Index

Constants

View Source
const StoragePeerFinalizer = "storagepeer.cniv1.webmesh.io"

StoragePeerFinalizer is the StoragePeer finalizer.

Variables

NewNode is the function for creating a new mesh node. Declared as a variable for testing purposes.

Functions

This section is empty.

Types

type NoOpStorageCloser

type NoOpStorageCloser struct {
	meshstorage.Provider
}

NoOpStorageCloser wraps the storage provider with a no-op closer so that mesh nodes will not close the storage provider.

func (*NoOpStorageCloser) Close

func (n *NoOpStorageCloser) Close() error

Close is a no-op.

type NodeReconciler

type NodeReconciler struct {
	client.Client
	Host     host.Node
	Provider *provider.Provider
}

NodeReconciler watches for nodes joining and leaving the cluster and ensures we have edges between the host node and them.

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles a node.

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the node reconciler with the manager.

type PeerContainerReconciler

type PeerContainerReconciler struct {
	client.Client
	config.Config
	Provider *provider.Provider
	Host     host.Node
	// contains filtered or unexported fields
}

PeerContainerReconciler reconciles a PeerContainer object. Reconcile attempts will fail until SetNetworkState is called.

func (*PeerContainerReconciler) LookupPrivateKey

func (r *PeerContainerReconciler) LookupPrivateKey(nodeID meshtypes.NodeID) (crypto.PrivateKey, bool)

LookupPrivateKey looks up the private key for the given node ID.

func (*PeerContainerReconciler) Reconcile

func (r *PeerContainerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles a PeerContainer.

func (*PeerContainerReconciler) SetDNSServer added in v0.0.18

func (r *PeerContainerReconciler) SetDNSServer(dns *meshdns.Server)

SetDNSServer sets the DNS server for the controller.

func (*PeerContainerReconciler) SetupWithManager

func (r *PeerContainerReconciler) SetupWithManager(mgr ctrl.Manager) (err error)

SetupWithManager sets up the controller with the Manager.

func (*PeerContainerReconciler) Shutdown

func (r *PeerContainerReconciler) Shutdown(ctx context.Context)

Shutdown shuts down the controller and all running mesh nodes.

type PodReconciler

type PodReconciler struct {
	client.Client
	Host         host.Node
	Provider     *provider.Provider
	DNSSelector  map[string]string
	DNSNamespace string
	DNSPort      string
}

PodReconciler watches for pods of interest to the outside world that have become ready and ensures their features are advertised. TODO: This reoconciler should be used to match up all pod names with containers for easier lookup.

func (*PodReconciler) Reconcile

func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles a node.

func (*PodReconciler) SetupWithManager

func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the node reconciler with the manager.

type RemoteNetworkReconciler

type RemoteNetworkReconciler struct {
	client.Client
	config.Config
	Provider *storageprovider.Provider
	HostNode host.Node
	// contains filtered or unexported fields
}

RemoteNetworkReconciler ensures bridge connections to other clusters.

func (*RemoteNetworkReconciler) Reconcile

func (r *RemoteNetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*RemoteNetworkReconciler) SetDNSServer added in v0.0.18

func (r *RemoteNetworkReconciler) SetDNSServer(srv *meshdns.Server)

SetDNSServer sets the DNS server for the controller.

func (*RemoteNetworkReconciler) SetupWithManager

func (r *RemoteNetworkReconciler) SetupWithManager(mgr ctrl.Manager) (err error)

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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