controller

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrgInstaslicePrefix         = "instaslice.redhat.com/"
	GateName                    = OrgInstaslicePrefix + "accelerator"
	FinalizerName               = GateName
	QuotaResourceName           = OrgInstaslicePrefix + "accelerator-memory-quota"
	GPUMemoryLabelName          = "nvidia.com/gpu.memory"
	GPUCountLabelName           = "nvidia.com/gpu.count"
	EmulatorModeFalse           = "false"
	EmulatorModeTrue            = "true"
	AttributeMediaExtensions    = "me"
	InstaSliceOperatorNamespace = "instaslice-system"
	NvidiaMIGPrefix             = "nvidia.com/mig-"
	NodeLabel                   = "kubernetes.io/hostname"

	InstasliceDaemonsetName = "instaslice-operator-controller-daemonset"

	Requeue1sDelay = 1 * time.Second
	Requeue2sDelay = 2 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationPolicy

type AllocationPolicy interface {
	SetAllocationDetails(profileName string, newStart, size int32, podUUID types.UID, nodename types.NodeName, allocationStatus inferencev1alpha1.AllocationStatus,
		discoveredGiprofile int32, Ciprofileid int32, Ciengprofileid int32, namespace string, podName string, gpuUuid string, resourceIndetifier types.UID,
		nodeResourceList v1.ResourceList) (*inferencev1alpha1.AllocationRequest, *inferencev1alpha1.AllocationResult)
}

AllocationPolicy interface with a single method

type FirstFitPolicy

type FirstFitPolicy struct{}

first fit policy is implemented at the moment

func (*FirstFitPolicy) SetAllocationDetails

func (r *FirstFitPolicy) SetAllocationDetails(profileName string, newStart, size int32, podUUID types.UID, nodename types.NodeName,
	allocationStatus inferencev1alpha1.AllocationStatus, discoveredGiprofile int32, Ciprofileid int32, Ciengprofileid int32,
	namespace string, podName string, gpuUuid string, resourceIdentifier types.UID, availableResourceList v1.ResourceList) (*inferencev1alpha1.AllocationRequest, *inferencev1alpha1.AllocationResult)

Policy based allocation - FirstFit

type InstasliceReconciler

type InstasliceReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	Config             *config.Config
	RunningOnOpenShift bool
	// contains filtered or unexported fields
}

InstasliceReconciler reconciles a Instaslice object

func (*InstasliceReconciler) Reconcile

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

func (*InstasliceReconciler) ReconcileSCC

func (r *InstasliceReconciler) ReconcileSCC(ctx context.Context) error

func (*InstasliceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type LeftToRightPolicy

type LeftToRightPolicy struct{}

not implemented

func (*LeftToRightPolicy) SetAllocationDetails

func (l *LeftToRightPolicy) SetAllocationDetails(profileName string, newStart, size int32, podUUID types.UID, nodename types.NodeName,
	allocationStatus inferencev1alpha1.AllocationStatus, discoveredGiprofile int32, Ciprofileid int32, Ciengprofileid int32,
	namespace string, podName string, gpuUuid string, resourceIdentifier types.UID, availableResourceList v1.ResourceList) *inferencev1alpha1.AllocationRequest

Policy based allocation - LeftToRIght

type PodAnnotator

type PodAnnotator struct {
	Client  client.Client
	Decoder admission.Decoder
}

func (*PodAnnotator) Handle

type RightToLeftPolicy

type RightToLeftPolicy struct{}

not implemented

func (*RightToLeftPolicy) SetAllocationDetails

func (l *RightToLeftPolicy) SetAllocationDetails(profileName string, newStart, size int32, podUUID types.UID, nodename types.NodeName,
	allocationStatus inferencev1alpha1.AllocationStatus, discoveredGiprofile int32, Ciprofileid int32, Ciengprofileid int32,
	namespace string, podName string, gpuUuid string, resourceIdentifier types.UID, availableResourceList v1.ResourceList) *inferencev1alpha1.AllocationRequest

Policy based allocation - RigghToLeft

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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