Documentation
¶
Index ¶
- Constants
- func CreateDNSEntry(network *l2smv1.L2Network, podName, podCIDR string) error
- func CreateErrorEvent(ctx context.Context, client client.Client, pod *corev1.Pod, message string, ...)
- func Generate4byteChunk() string
- func GenerateAnnotations(overlayName string, ammount int) string
- 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)
- func GetL2NetworksMap(ctx context.Context, c client.Client, networks []NetworkAnnotation) (map[string]l2smv1.L2Network, error)
- func GetNextAvailableIP(networkCIDR, lastAssignedIP string, assignedIPs map[string]string) (string, string, error)
- type L2NetworkReconciler
- func (r *L2NetworkReconciler) ConnectInternalSwitchToNED(ctx context.Context, networkName, nedNodeName string) (nettypes.NetworkAttachmentDefinition, error)
- func (r *L2NetworkReconciler) CreateNewNEDConnection(network *l2smv1.L2Network, nedNetworkAttachDef string, ...) error
- func (r *L2NetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *L2NetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
- type NetworkAnnotation
- type NetworkEdgeDeviceReconciler
- type NodeJson
- type OverlayConfigJson
- type OverlayReconciler
- type PodAnnotator
- type PodReconciler
- type TopologySwitchJson
Constants ¶
const ( NET_ATTACH_LABEL_PREFIX = "used-" L2SM_NETWORK_ANNOTATION = "l2sm/networks" MULTUS_ANNOTATION_KEY = "k8s.v1.cni.cncf.io/networks" ERROR_ANNOTATION = "l2sm/error" L2SM_PODNAME_LABEL = "l2sm/app" )
Variables ¶
This section is empty.
Functions ¶
func CreateDNSEntry ¶ added in v1.2.11
func CreateErrorEvent ¶ added in v1.2.9
func Generate4byteChunk ¶ added in v1.2.9
func Generate4byteChunk() string
func GenerateAnnotations ¶ added in v1.2.9
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 SwitchesNamespace string }
L2NetworkReconciler reconciles a L2Network object
func (*L2NetworkReconciler) ConnectInternalSwitchToNED ¶ added in v1.2.10
func (r *L2NetworkReconciler) ConnectInternalSwitchToNED(ctx context.Context, networkName, nedNodeName string) (nettypes.NetworkAttachmentDefinition, error)
func (*L2NetworkReconciler) CreateNewNEDConnection ¶ added in v1.2.10
func (r *L2NetworkReconciler) CreateNewNEDConnection(network *l2smv1.L2Network, nedNetworkAttachDef string, ned l2smv1.NetworkEdgeDevice) error
CreateNEDConnection is a method that given the name of the network and the
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 OverlayConfigJson ¶ added in v1.2.9
type OverlayConfigJson struct {
ControllerIp string `json:"ControllerIp"`
}
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=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) 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.