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
- type HubClientProvider
- type NetOpPod
- type SliceReconciler
- func (r *SliceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *SliceReconciler) ReconcileAppPod(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)
- func (r *SliceReconciler) ReconcileSliceGwEdge(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)
- func (r *SliceReconciler) ReconcileSliceNamespaces(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)
- func (r *SliceReconciler) ReconcileSliceRouter(ctx context.Context, slice *kubeslicev1beta1.Slice) (ctrl.Result, error, bool)
- func (r *SliceReconciler) SendSliceDeletionEventToNetOp(ctx context.Context, sliceName string, namespace string) error
- func (r *SliceReconciler) Setup(mgr ctrl.Manager, mf metrics.MetricsFactory) error
- func (r *SliceReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *SliceReconciler) SyncSliceQosProfileWithNetOp(ctx context.Context, slice *kubeslicev1beta1.Slice) error
- type WorkerGatewayEdgeClientProvider
- type WorkerNetOpClientProvider
- type WorkerRouterClientProvider
Constants ¶
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 NetOpPod ¶
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) 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 ¶
func (r *SliceReconciler) Setup(mgr ctrl.Manager, mf metrics.MetricsFactory) error
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 }