Documentation ¶
Overview ¶
Package controllers contains the controllers for the webmesh-cni.
Index ¶
- Constants
- Variables
- type NoOpStorageCloser
- type NodeReconciler
- type PeerContainerReconciler
- func (r *PeerContainerReconciler) LookupPrivateKey(nodeID meshtypes.NodeID) (crypto.PrivateKey, bool)
- func (r *PeerContainerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PeerContainerReconciler) SetDNSServer(dns *meshdns.Server)
- func (r *PeerContainerReconciler) SetupWithManager(mgr ctrl.Manager) (err error)
- func (r *PeerContainerReconciler) Shutdown(ctx context.Context)
- type PodReconciler
- type RemoteNetworkReconciler
Constants ¶
const StoragePeerFinalizer = "storagepeer.cniv1.webmesh.io"
StoragePeerFinalizer is the StoragePeer finalizer.
Variables ¶
var NewNode = meshnode.NewWithLogger
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.
type NodeReconciler ¶
NodeReconciler watches for nodes joining and leaving the cluster and ensures we have edges between the host node and them.
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) 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) 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.