multirm

package
v0.750.8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrRPNotDefined

func ErrRPNotDefined(rp rm.ResourcePoolName) error

ErrRPNotDefined returns a detailed error if a resource pool isn't found.

Types

type MultiRMRouter

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

MultiRMRouter tracks all resource managers in the system.

func New

func New(defaultClusterName string, rms map[string]rm.ResourceManager) *MultiRMRouter

New returns a new MultiRM.

func (*MultiRMRouter) Allocate

Allocate routes an AllocateRequest to the specified RM.

func (*MultiRMRouter) CreateNamespace

func (m *MultiRMRouter) CreateNamespace(namespaceName string, clusterName string,
	fanout bool,
) error

CreateNamespace deletes the given namespace (if it exists) in all Kubernetes clusters referenced by resource managers in the current determined deployment.

func (*MultiRMRouter) DefaultNamespace

func (m *MultiRMRouter) DefaultNamespace(clusterName string) (*string, error)

DefaultNamespace is the default namespace used within a given Kubernetes RpM's Kubernetes cluster.

func (*MultiRMRouter) DeleteJob

DeleteJob routes a DeleteJob request to the specified resource manager.

func (*MultiRMRouter) DeleteNamespace

func (m *MultiRMRouter) DeleteNamespace(namespaceName string) error

DeleteNamespace deletes the given namespace (if it exists) in all Kubernetes clusters referenced by resource managers in the current determined deployment.

func (*MultiRMRouter) DisableAgent

DisableAgent routes an DisableAgent request to the specified resource manager & agent.

func (*MultiRMRouter) DisableSlot

DisableSlot routes an DisableSlot request to the specified resource manager & agent.

func (*MultiRMRouter) EnableAgent

EnableAgent routes an EnableAgent request to the specified resource manager & agent.

func (*MultiRMRouter) EnableSlot

EnableSlot routes an EnableSlot request to the specified resource manager & agent.

func (*MultiRMRouter) ExternalPreemptionPending added in v0.750.0

func (m *MultiRMRouter) ExternalPreemptionPending(sproto.PendingPreemption) error

ExternalPreemptionPending routes an ExternalPreemptionPending request to the specified resource manager.

func (*MultiRMRouter) GetAgent

GetAgent routes a GetAgent request to the specified resource manager & agent.

func (*MultiRMRouter) GetAgents

func (m *MultiRMRouter) GetAgents() (*apiv1.GetAgentsResponse, error)

GetAgents returns all agents across all resource managers.

func (*MultiRMRouter) GetAllocationSummaries

func (m *MultiRMRouter) GetAllocationSummaries() (
	map[model.AllocationID]sproto.AllocationSummary,
	error,
)

GetAllocationSummaries returns the allocation summaries for all resource pools across all resource managers.

func (*MultiRMRouter) GetDefaultAuxResourcePool

func (m *MultiRMRouter) GetDefaultAuxResourcePool() (rm.ResourcePoolName, error)

GetDefaultAuxResourcePool routes a GetDefaultAuxResourcePool to the specified resource manager.

func (*MultiRMRouter) GetDefaultComputeResourcePool

func (m *MultiRMRouter) GetDefaultComputeResourcePool() (rm.ResourcePoolName, error)

GetDefaultComputeResourcePool routes a GetDefaultComputeResourcePool to the specified resource manager.

func (*MultiRMRouter) GetExternalJobs

func (m *MultiRMRouter) GetExternalJobs(rpName rm.ResourcePoolName) ([]*jobv1.Job, error)

GetExternalJobs routes a GetExternalJobs request to a specified resource manager.

func (*MultiRMRouter) GetJobQ

func (m *MultiRMRouter) GetJobQ(rpName rm.ResourcePoolName) (map[model.JobID]*sproto.RMJobInfo, error)

GetJobQ routes a GetJobQ call to a specified resource manager/pool.

func (*MultiRMRouter) GetJobQueueStatsRequest

func (m *MultiRMRouter) GetJobQueueStatsRequest(req *apiv1.GetJobQueueStatsRequest) (
	*apiv1.GetJobQueueStatsResponse, error,
)

GetJobQueueStatsRequest routes a GetJobQueueStatsRequest to the specified resource manager.

func (*MultiRMRouter) GetNamespaceResourceQuota

func (m *MultiRMRouter) GetNamespaceResourceQuota(namespaceName string,
	clusterName string,
) (*float64, error)

GetNamespaceResourceQuota gets the resource quota for the specified namespace.

func (*MultiRMRouter) GetResourcePools

func (m *MultiRMRouter) GetResourcePools() (*apiv1.GetResourcePoolsResponse, error)

GetResourcePools returns all resource pools across all resource managers.

func (*MultiRMRouter) GetSlot

GetSlot routes an GetSlot request to the specified resource manager & agent.

func (*MultiRMRouter) GetSlots

GetSlots routes an GetSlots request to the specified resource manager & agent.

func (*MultiRMRouter) HealthCheck

func (m *MultiRMRouter) HealthCheck() []model.ResourceManagerHealth

HealthCheck calls HealthCheck on all the resource managers.

func (*MultiRMRouter) IsReattachableOnlyAfterStarted

func (m *MultiRMRouter) IsReattachableOnlyAfterStarted() bool

IsReattachableOnlyAfterStarted routes a IsReattachableOnlyAfterStarted call to a specified resource manager/pool.

func (*MultiRMRouter) NotifyContainerRunning

func (m *MultiRMRouter) NotifyContainerRunning(req sproto.NotifyContainerRunning) error

NotifyContainerRunning routes a NotifyContainerRunning request to a specified resource manager/pool.

func (*MultiRMRouter) RecoverJobPosition

func (m *MultiRMRouter) RecoverJobPosition(req sproto.RecoverJobPosition)

RecoverJobPosition routes a RecoverJobPosition call to a specified resource manager/pool.

func (*MultiRMRouter) Release

func (m *MultiRMRouter) Release(req sproto.ResourcesReleased)

Release routes an allocation release request.

func (*MultiRMRouter) RemoveEmptyNamespace

func (m *MultiRMRouter) RemoveEmptyNamespace(namespaceName string,
	clusterName string,
) error

RemoveEmptyNamespace removes a namespace from our interfaces in cluster if it is no longer used by any workspace.

func (*MultiRMRouter) ResolveResourcePool

func (m *MultiRMRouter) ResolveResourcePool(rpName rm.ResourcePoolName, workspace, slots int) (
	rm.ResourcePoolName, error,
)

ResolveResourcePool routes a ResolveResourcePool request for a specific resource manager/pool.

func (*MultiRMRouter) SetGroupMaxSlots

func (m *MultiRMRouter) SetGroupMaxSlots(req sproto.SetGroupMaxSlots)

SetGroupMaxSlots routes a SetGroupMaxSlots request to a specified resource manager/pool.

func (*MultiRMRouter) SetGroupPriority

func (m *MultiRMRouter) SetGroupPriority(req sproto.SetGroupPriority) error

SetGroupPriority routes a SetGroupPriority request to a specified resource manager/pool.

func (*MultiRMRouter) SetGroupWeight

func (m *MultiRMRouter) SetGroupWeight(req sproto.SetGroupWeight) error

SetGroupWeight routes a SetGroupWeight request to a specified resource manager/pool.

func (*MultiRMRouter) SetResourceQuota

func (m *MultiRMRouter) SetResourceQuota(quota int, namespace, clusterName string,
) error

SetResourceQuota creates a resource quota in the given Kubernetes namespace of the specified cluster.

func (*MultiRMRouter) TaskContainerDefaults

func (m *MultiRMRouter) TaskContainerDefaults(
	rpName rm.ResourcePoolName,
	fallbackConfig model.TaskContainerDefaultsConfig,
) (model.TaskContainerDefaultsConfig, error)

TaskContainerDefaults routes a TaskContainerDefaults call to a specific resource manager/pool.

func (*MultiRMRouter) ValidateResourcePool

func (m *MultiRMRouter) ValidateResourcePool(rpName rm.ResourcePoolName) error

ValidateResourcePool routes a ValidateResourcePool call to the specified resource manager.

func (*MultiRMRouter) ValidateResources

ValidateResources routes a validation request for a specified resource manager/pool.

func (*MultiRMRouter) VerifyNamespaceExists

func (m *MultiRMRouter) VerifyNamespaceExists(namespaceName string,
	clusterName string,
) error

VerifyNamespaceExists verifies the existence of a Kubernetes namespace within a given cluster.

Jump to

Keyboard shortcuts

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