controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LeaderResourceLockName   = "gpunode-lifecycle-controller"
	RetrySleepTime           = 20 * time.Millisecond
	GpuNodeHealthUpdateRetry = 3
)

Variables

This section is empty.

Functions

func ResyncPeriod added in v0.2.0

func ResyncPeriod() func() time.Duration

func StartGpuManagerAndLifecycleControllerErrExit added in v0.2.0

func StartGpuManagerAndLifecycleControllerErrExit(ctx context.Context, kubeconfig *rest.Config, kubeClient kubernetes.Interface, gpuClient gpuclientset.Interface) (gpuMgrClient client.Client)

Types

type Controller added in v0.2.0

type Controller struct {
	// contains filtered or unexported fields
}

func NewNodeLifecycleController added in v0.2.0

func NewNodeLifecycleController(
	nodeMonitorPeriod time.Duration,
	nodeMonitorGracePeriod time.Duration,
	leaseLister coordlisters.LeaseLister,
	leaseInformerSynced cache.InformerSynced,
	gpuclient gpuclientset.Interface,
	gpuMgrClient client.Client,
	gpuInformerSynced cache.InformerSynced,
) *Controller

func (*Controller) Run added in v0.2.0

func (nc *Controller) Run(ctx context.Context)

type GpuNodeReconciler added in v0.2.0

type GpuNodeReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GpuNodeReconciler reconciles a GpuNode object

func (*GpuNodeReconciler) Reconcile added in v0.2.0

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

func (*GpuNodeReconciler) SetupWithManager added in v0.2.0

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

SetupWithManager sets up the controller with the Manager.

type GpuPodReconciler added in v0.2.0

type GpuPodReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GpuPodReconciler reconciles a GpuPod object

func (*GpuPodReconciler) Reconcile added in v0.2.0

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

func (*GpuPodReconciler) SetupWithManager added in v0.2.0

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

SetupWithManager sets up the controller with the Manager.

type ServerController

type ServerController struct {
	FW framework.Framework

	GpuMgrClient client.Client
	// contains filtered or unexported fields
}

ServerController is the main controller to process api requests. Index the pod gpu usage info with podresourcesIndex. Index the node gpu info with nodegpuinfomap.

func NewServerController

func NewServerController(stop <-chan struct{}, parallelism int, gpuMgrClient client.Client) (*ServerController, error)

func (*ServerController) GetParallelism

func (sc *ServerController) GetParallelism() int

Jump to

Keyboard shortcuts

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