slice

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

* Copyright (c) 2022 Avesha, Inc. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const (
	ControlPlaneNamespace                = "kubeslice-system"
	AllowedNamespaceSelectorLabelKey     = "kubeslice.io/namespace"
	ApplicationNamespaceSelectorLabelKey = "kubeslice.io/slice"
	AllowedNamespaceAnnotationKey        = "kubeslice.io/trafficAllowedToSlices"
	InjectSidecarKey                     = "kubeslice.io/inject"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HubClientProvider

type HubClientProvider interface {
	UpdateAppPodsList(ctx context.Context, sliceConfigName string, appPods []kubeslicev1beta1.AppPod) error
	UpdateAppNamespaces(ctx context.Context, sliceConfigName string, onboardedNamespaces []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 SliceReconciler

type SliceReconciler struct {
	client.Client
	EventRecorder           *events.EventRecorder
	Scheme                  *runtime.Scheme
	Log                     logr.Logger
	NetOpPods               []NetOpPod
	HubClient               HubClientProvider
	WorkerRouterClient      WorkerRouterClientProvider
	WorkerNetOpClient       WorkerNetOpClientProvider
	WorkerGatewayEdgeClient WorkerGatewayEdgeClientProvider
	// contains filtered or unexported fields
}

SliceReconciler reconciles a Slice object

func (*SliceReconciler) Reconcile

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

func (*SliceReconciler) ReconcileAppPod

func (r *SliceReconciler) ReconcileAppPod(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)

ReconcileAppPod reconciles app pods

func (*SliceReconciler) ReconcileSliceGwEdge added in v1.2.0

func (r *SliceReconciler) ReconcileSliceGwEdge(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)

func (*SliceReconciler) ReconcileSliceNamespaces

func (r *SliceReconciler) ReconcileSliceNamespaces(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)

func (*SliceReconciler) ReconcileSliceRouter

func (r *SliceReconciler) ReconcileSliceRouter(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)

func (*SliceReconciler) SendSliceDeletionEventToNetOp

func (r *SliceReconciler) SendSliceDeletionEventToNetOp(ctx context.Context, sliceName string, namespace string) error

SendSliceDeletionEventToNetOp sends slice deletion event to netop pods for cleanup

func (*SliceReconciler) Setup

Setup SliceReconciler Initializes metrics and sets up with manager

func (*SliceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*SliceReconciler) SyncSliceQosProfileWithNetOp

func (r *SliceReconciler) SyncSliceQosProfileWithNetOp(ctx context.Context, slice *kubeslicev1beta1.Slice) error

SyncSliceQosProfileWithNetOp Syncs slice qos profile with netop pods

type WorkerGatewayEdgeClientProvider added in v1.2.0

type WorkerGatewayEdgeClientProvider interface {
	UpdateSliceGwServiceMap(ctx context.Context, serverAddr string, gwSvcMap *gatewayedge.SliceGwServiceMap) (*gatewayedge.GwEdgeResponse, 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
}

Jump to

Keyboard shortcuts

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