slicegateway

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GwMap = make(map[string]int)

gwMap holds the mapping between gwPodName and NodePort number

Functions

func UpdateGWPodStatus

func UpdateGWPodStatus(gwPodStatus []*kubeslicev1beta1.GwPodInfo, podName string) []*kubeslicev1beta1.GwPodInfo

Types

type HubClientProvider

type HubClientProvider interface {
	UpdateNodePortForSliceGwServer(ctx context.Context, sliceGwNodePort []int, sliceGwName string) error
	GetClusterNodeIP(ctx context.Context, clusterName, namespace string) ([]string, error)
	CreateWorkerSliceGwRecycler(ctx context.Context, gwRecyclerName, clientID, serverID, sliceGwServer, sliceGwClient, slice string) error
}

type NetOpPod

type NetOpPod struct {
	PodIP   string
	PodName string
	Node    string
}

NetOpPod contains details of NetOp Pod running in the cluster

func GetNetOpPods

func GetNetOpPods(ctx context.Context, namespace string,
	listFn func(context.Context, client.ObjectList, ...client.ListOption) error) ([]NetOpPod, error)

GetNetOpPods returns the netop pods in the cluster

type SliceGwReconciler

type SliceGwReconciler struct {
	client.Client
	Scheme                *runtime.Scheme
	Log                   logr.Logger
	HubClient             HubClientProvider
	WorkerRouterClient    WorkerRouterClientProvider
	WorkerNetOpClient     WorkerNetOpClientProvider
	WorkerGWSidecarClient WorkerGWSidecarClientProvider
	NetOpPods             []NetOpPod
	EventRecorder         *events.EventRecorder
	NodeIPs               []string
	NumberOfGateways      int
}

SliceReconciler reconciles a Slice object

func (*SliceGwReconciler) FindSliceRouterService

func (r *SliceGwReconciler) FindSliceRouterService(ctx context.Context, c client.Client, sliceName string) (bool, error)

func (*SliceGwReconciler) GetGwPodInfo

func (*SliceGwReconciler) Reconcile

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

func (*SliceGwReconciler) ReconcileGwPodStatus

func (r *SliceGwReconciler) ReconcileGwPodStatus(ctx context.Context, slicegateway *kubeslicev1beta1.SliceGateway) (ctrl.Result, error, bool)

func (*SliceGwReconciler) SendConnectionContextAndQosToGwPod

func (r *SliceGwReconciler) SendConnectionContextAndQosToGwPod(ctx context.Context, slice *kubeslicev1beta1.Slice, slicegateway *kubeslicev1beta1.SliceGateway, req reconcile.Request) (ctrl.Result, error, bool)

func (*SliceGwReconciler) SendConnectionContextToSliceRouter

func (r *SliceGwReconciler) SendConnectionContextToSliceRouter(ctx context.Context, slicegateway *kubeslicev1beta1.SliceGateway) (ctrl.Result, error, bool)

In the event of slice router deletion as well this function needs to be called so that the routes can be injected into the router sidecar

func (*SliceGwReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*SliceGwReconciler) SyncNetOpConnectionContextAndQos

func (r *SliceGwReconciler) SyncNetOpConnectionContextAndQos(ctx context.Context, slice *kubeslicev1beta1.Slice, slicegw *kubeslicev1beta1.SliceGateway, sliceGwNodePorts []int) error

func (*SliceGwReconciler) UpdateRoutesInRouter

func (r *SliceGwReconciler) UpdateRoutesInRouter(ctx context.Context, slicegateway *kubeslicev1beta1.SliceGateway, NsmIP string) error

type WorkerGWSidecarClientProvider

type WorkerGWSidecarClientProvider interface {
	GetSliceGwRemotePodName(ctx context.Context, gwRemoteVpnIP string, serverAddr string) (string, error)
	GetStatus(ctx context.Context, serverAddr string) (*gwsidecar.GwStatus, error)
	SendConnectionContext(ctx context.Context, serverAddr string, gwConnCtx *gwsidecar.GwConnectionContext) error
	UpdateSliceQosProfile(ctx context.Context, serverAddr string, slice *kubeslicev1beta1.Slice) error
}

type WorkerNetOpClientProvider

type WorkerNetOpClientProvider interface {
	UpdateSliceQosProfile(ctx context.Context, addr string, slice *kubeslicev1beta1.Slice) error
	SendSliceLifeCycleEventToNetOp(ctx context.Context, addr string, sliceName string, eventType netop.EventType) error
	SendConnectionContext(ctx context.Context, serverAddr string, gw *kubeslicev1beta1.SliceGateway, sliceGwNodePorts []int) error
}

type WorkerRouterClientProvider

type WorkerRouterClientProvider interface {
	GetClientConnectionInfo(ctx context.Context, addr string) ([]kubeslicev1beta1.AppPod, error)
	SendConnectionContext(ctx context.Context, serverAddr string, sliceRouterConnCtx *router.SliceRouterConnCtx) error
	UpdateEcmpRoutes(ctx context.Context, serverAddr string, ecmpUpdateInfo *router.UpdateEcmpInfo) error
}

Jump to

Keyboard shortcuts

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