Documentation ¶
Index ¶
- func ErrRPNotDefined(rp rm.ResourcePoolName) error
- type MultiRMRouter
- func (m *MultiRMRouter) Allocate(req sproto.AllocateRequest) (*sproto.ResourcesSubscription, error)
- func (m *MultiRMRouter) CreateNamespace(namespaceName string, clusterName string, fanout bool) error
- func (m *MultiRMRouter) DefaultNamespace(clusterName string) (*string, error)
- func (m *MultiRMRouter) DeleteJob(req sproto.DeleteJob) (sproto.DeleteJobResponse, error)
- func (m *MultiRMRouter) DeleteNamespace(namespaceName string) error
- func (m *MultiRMRouter) DisableAgent(req *apiv1.DisableAgentRequest) (*apiv1.DisableAgentResponse, error)
- func (m *MultiRMRouter) DisableSlot(req *apiv1.DisableSlotRequest) (*apiv1.DisableSlotResponse, error)
- func (m *MultiRMRouter) EnableAgent(req *apiv1.EnableAgentRequest) (*apiv1.EnableAgentResponse, error)
- func (m *MultiRMRouter) EnableSlot(req *apiv1.EnableSlotRequest) (*apiv1.EnableSlotResponse, error)
- func (m *MultiRMRouter) ExternalPreemptionPending(sproto.PendingPreemption) error
- func (m *MultiRMRouter) GetAgent(req *apiv1.GetAgentRequest) (*apiv1.GetAgentResponse, error)
- func (m *MultiRMRouter) GetAgents() (*apiv1.GetAgentsResponse, error)
- func (m *MultiRMRouter) GetAllocationSummaries() (map[model.AllocationID]sproto.AllocationSummary, error)
- func (m *MultiRMRouter) GetDefaultAuxResourcePool() (rm.ResourcePoolName, error)
- func (m *MultiRMRouter) GetDefaultComputeResourcePool() (rm.ResourcePoolName, error)
- func (m *MultiRMRouter) GetExternalJobs(rpName rm.ResourcePoolName) ([]*jobv1.Job, error)
- func (m *MultiRMRouter) GetJobQ(rpName rm.ResourcePoolName) (map[model.JobID]*sproto.RMJobInfo, error)
- func (m *MultiRMRouter) GetJobQueueStatsRequest(req *apiv1.GetJobQueueStatsRequest) (*apiv1.GetJobQueueStatsResponse, error)
- func (m *MultiRMRouter) GetNamespaceResourceQuota(namespaceName string, clusterName string) (*float64, error)
- func (m *MultiRMRouter) GetResourcePools() (*apiv1.GetResourcePoolsResponse, error)
- func (m *MultiRMRouter) GetSlot(req *apiv1.GetSlotRequest) (*apiv1.GetSlotResponse, error)
- func (m *MultiRMRouter) GetSlots(req *apiv1.GetSlotsRequest) (*apiv1.GetSlotsResponse, error)
- func (m *MultiRMRouter) HealthCheck() []model.ResourceManagerHealth
- func (m *MultiRMRouter) IsReattachableOnlyAfterStarted() bool
- func (m *MultiRMRouter) NotifyContainerRunning(req sproto.NotifyContainerRunning) error
- func (m *MultiRMRouter) RecoverJobPosition(req sproto.RecoverJobPosition)
- func (m *MultiRMRouter) Release(req sproto.ResourcesReleased)
- func (m *MultiRMRouter) RemoveEmptyNamespace(namespaceName string, clusterName string) error
- func (m *MultiRMRouter) ResolveResourcePool(rpName rm.ResourcePoolName, workspace, slots int) (rm.ResourcePoolName, error)
- func (m *MultiRMRouter) SetGroupMaxSlots(req sproto.SetGroupMaxSlots)
- func (m *MultiRMRouter) SetGroupPriority(req sproto.SetGroupPriority) error
- func (m *MultiRMRouter) SetGroupWeight(req sproto.SetGroupWeight) error
- func (m *MultiRMRouter) SetResourceQuota(quota int, namespace, clusterName string) error
- func (m *MultiRMRouter) TaskContainerDefaults(rpName rm.ResourcePoolName, fallbackConfig model.TaskContainerDefaultsConfig) (model.TaskContainerDefaultsConfig, error)
- func (m *MultiRMRouter) ValidateResourcePool(rpName rm.ResourcePoolName) error
- func (m *MultiRMRouter) ValidateResources(req sproto.ValidateResourcesRequest) ([]command.LaunchWarning, error)
- func (m *MultiRMRouter) VerifyNamespaceExists(namespaceName string, clusterName string) error
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 ¶
func (m *MultiRMRouter) Allocate(req sproto.AllocateRequest) (*sproto.ResourcesSubscription, error)
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 ¶
func (m *MultiRMRouter) DeleteJob(req sproto.DeleteJob) (sproto.DeleteJobResponse, error)
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 ¶
func (m *MultiRMRouter) DisableAgent(req *apiv1.DisableAgentRequest) ( *apiv1.DisableAgentResponse, error, )
DisableAgent routes an DisableAgent request to the specified resource manager & agent.
func (*MultiRMRouter) DisableSlot ¶
func (m *MultiRMRouter) DisableSlot(req *apiv1.DisableSlotRequest) (*apiv1.DisableSlotResponse, error)
DisableSlot routes an DisableSlot request to the specified resource manager & agent.
func (*MultiRMRouter) EnableAgent ¶
func (m *MultiRMRouter) EnableAgent(req *apiv1.EnableAgentRequest) (*apiv1.EnableAgentResponse, error)
EnableAgent routes an EnableAgent request to the specified resource manager & agent.
func (*MultiRMRouter) EnableSlot ¶
func (m *MultiRMRouter) EnableSlot(req *apiv1.EnableSlotRequest) (*apiv1.EnableSlotResponse, error)
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 ¶
func (m *MultiRMRouter) GetAgent(req *apiv1.GetAgentRequest) (*apiv1.GetAgentResponse, error)
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 ¶
func (m *MultiRMRouter) GetSlot(req *apiv1.GetSlotRequest) (*apiv1.GetSlotResponse, error)
GetSlot routes an GetSlot request to the specified resource manager & agent.
func (*MultiRMRouter) GetSlots ¶
func (m *MultiRMRouter) GetSlots(req *apiv1.GetSlotsRequest) (*apiv1.GetSlotsResponse, error)
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 ¶
func (m *MultiRMRouter) ValidateResources(req sproto.ValidateResourcesRequest) ([]command.LaunchWarning, error)
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.