Documentation ¶
Index ¶
- Constants
- func GetFreeNetAttachDefs(ctx context.Context, c client.Client, switchesNamespace, label string) nettypes.NetworkAttachmentDefinitionList
- func GetL2Networks(ctx context.Context, c client.Client, networks []NetworkAnnotation) ([]l2smv1.L2Network, error)
- type L2NetworkReconciler
- type NetworkAnnotation
- type NetworkEdgeDeviceReconciler
- type NodeJson
- type OverlayReconciler
- type PodAnnotator
- type PodReconciler
- func (r *PodReconciler) ConnectInternalSwitchToNED(ctx context.Context, networkName, nedNodeName string) (nettypes.NetworkAttachmentDefinition, error)
- func (r *PodReconciler) CreateNewNEDConnection(network l2smv1.L2Network, nedNetworkAttachDef string, ...) error
- func (r *PodReconciler) DetachNetAttachDef(ctx context.Context, multusNetAttachDef NetworkAnnotation, namespace string) error
- func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error
- type TopologySwitchJson
Constants ¶
const ( NET_ATTACH_LABEL_PREFIX = "used-" L2SM_NETWORK_ANNOTATION = "l2sm/networks" MULTUS_ANNOTATION_KEY = "k8s.v1.cni.cncf.io/networks" )
Variables ¶
This section is empty.
Functions ¶
func GetFreeNetAttachDefs ¶
func GetL2Networks ¶
Types ¶
type L2NetworkReconciler ¶
type L2NetworkReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme // Manages interactions with the onos SDN Controller. InternalClient sdnclient.Client }
L2NetworkReconciler reconciles a L2Network object
func (*L2NetworkReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the L2Network object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*L2NetworkReconciler) SetupWithManager ¶
func (r *L2NetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type NetworkAnnotation ¶
type NetworkAnnotation struct { Name string `json:"name"` Namespace string `json:"namespace,omitempty"` IPAdresses []string `json:"ips,omitempty"` }
func (*NetworkAnnotation) GenerateIPv6Address ¶
func (network *NetworkAnnotation) GenerateIPv6Address()
type NetworkEdgeDeviceReconciler ¶
NetworkEdgeDeviceReconciler reconciles a NetworkEdgeDevice object
func (*NetworkEdgeDeviceReconciler) Reconcile ¶
func (r *NetworkEdgeDeviceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the NetworkEdgeDevice object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*NetworkEdgeDeviceReconciler) SetupWithManager ¶
func (r *NetworkEdgeDeviceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type OverlayReconciler ¶
OverlayReconciler reconciles a Overlay object
func (*OverlayReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Overlay object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*OverlayReconciler) SetupWithManager ¶
func (r *OverlayReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PodAnnotator ¶
type PodAnnotator struct { Client client.Client Decoder *admission.Decoder SwitchesNamespace string }
+kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=fail,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io
func (*PodAnnotator) InjectDecoder ¶
func (a *PodAnnotator) InjectDecoder(d *admission.Decoder) error
type PodReconciler ¶
type PodReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme SwitchesNamespace string InternalClient sdnclient.Client }
PodReconciler reconciles a Pod object
func (*PodReconciler) ConnectInternalSwitchToNED ¶
func (r *PodReconciler) ConnectInternalSwitchToNED(ctx context.Context, networkName, nedNodeName string) (nettypes.NetworkAttachmentDefinition, error)
func (*PodReconciler) CreateNewNEDConnection ¶
func (r *PodReconciler) CreateNewNEDConnection(network l2smv1.L2Network, nedNetworkAttachDef string, ned l2smv1.NetworkEdgeDevice) error
CreateNEDConnection is a method that given the name of the network and the
func (*PodReconciler) DetachNetAttachDef ¶
func (r *PodReconciler) DetachNetAttachDef(ctx context.Context, multusNetAttachDef NetworkAnnotation, namespace string) error
func (*PodReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Pod object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*PodReconciler) SetupWithManager ¶
func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.