component

package
v1.41.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ClientUpdateInProgressAnnotation    = constants.Domain + "/client-update-in-progress"
	ClientBatchUpdateLastTimeAnnotation = constants.Domain + "/client-batch-update-last-time"
)
View Source
const (
	HypervisorUpdateInProgressAnnotation    = constants.Domain + "/hypervisor-update-in-progress"
	HypervisorBatchUpdateLastTimeAnnotation = constants.Domain + "/hypervisor-batch-update-last-time"
)
View Source
const (
	WorkerUpdateInProgressAnnotation    = constants.Domain + "/worker-update-in-progress"
	WorkerBatchUpdateLastTimeAnnotation = constants.Domain + "/worker-batch-update-last-time"
)

Variables

This section is empty.

Functions

func ManageUpdate

func ManageUpdate(r client.Client, ctx context.Context, pool *tfv1.GPUPool, component Interface) (*ctrl.Result, error)

Types

type Client

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

func (*Client) DetectConfigChange

func (c *Client) DetectConfigChange(pool *tfv1.GPUPool, status *tfv1.PoolComponentStatus) (bool, string, string)

func (*Client) GetBatchUpdateLastTimeInfo

func (c *Client) GetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool) string

func (*Client) GetName

func (c *Client) GetName() string

func (*Client) GetResourcesInfo

func (c *Client) GetResourcesInfo(r client.Client, ctx context.Context, pool *tfv1.GPUPool, configHash string) (int, int, bool, error)

func (*Client) GetUpdateInProgressInfo

func (c *Client) GetUpdateInProgressInfo(pool *tfv1.GPUPool) string

func (*Client) GetUpdateProgress

func (c *Client) GetUpdateProgress(status *tfv1.PoolComponentStatus) int32

func (*Client) PerformBatchUpdate

func (c *Client) PerformBatchUpdate(r client.Client, ctx context.Context, pool *tfv1.GPUPool, delta int) (bool, error)

func (*Client) SetBatchUpdateLastTimeInfo

func (c *Client) SetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool, time string)

func (*Client) SetConfigHash

func (c *Client) SetConfigHash(status *tfv1.PoolComponentStatus, hash string)

func (*Client) SetUpdateInProgressInfo

func (c *Client) SetUpdateInProgressInfo(pool *tfv1.GPUPool, hash string)

func (*Client) SetUpdateProgress

func (c *Client) SetUpdateProgress(status *tfv1.PoolComponentStatus, progress int32)

type ClientPodsByCreationTimestamp

type ClientPodsByCreationTimestamp []*corev1.Pod

func (ClientPodsByCreationTimestamp) Len

func (ClientPodsByCreationTimestamp) Less

func (o ClientPodsByCreationTimestamp) Less(i, j int) bool

func (ClientPodsByCreationTimestamp) Swap

func (o ClientPodsByCreationTimestamp) Swap(i, j int)

type GPUNodeByCreationTimestamp

type GPUNodeByCreationTimestamp []*tfv1.GPUNode

func (GPUNodeByCreationTimestamp) Len

func (GPUNodeByCreationTimestamp) Less

func (o GPUNodeByCreationTimestamp) Less(i, j int) bool

func (GPUNodeByCreationTimestamp) Swap

func (o GPUNodeByCreationTimestamp) Swap(i, j int)

type Hypervisor

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

func (*Hypervisor) DetectConfigChange

func (h *Hypervisor) DetectConfigChange(pool *tfv1.GPUPool, status *tfv1.PoolComponentStatus) (bool, string, string)

func (*Hypervisor) GetBatchUpdateLastTimeInfo

func (h *Hypervisor) GetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool) string

func (*Hypervisor) GetName

func (h *Hypervisor) GetName() string

func (*Hypervisor) GetResourcesInfo

func (h *Hypervisor) GetResourcesInfo(r client.Client, ctx context.Context, pool *tfv1.GPUPool, configHash string) (int, int, bool, error)

func (*Hypervisor) GetUpdateInProgressInfo

func (h *Hypervisor) GetUpdateInProgressInfo(pool *tfv1.GPUPool) string

func (*Hypervisor) GetUpdateProgress

func (h *Hypervisor) GetUpdateProgress(status *tfv1.PoolComponentStatus) int32

func (*Hypervisor) PerformBatchUpdate

func (h *Hypervisor) PerformBatchUpdate(r client.Client, ctx context.Context, pool *tfv1.GPUPool, delta int) (bool, error)

func (*Hypervisor) SetBatchUpdateLastTimeInfo

func (h *Hypervisor) SetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool, time string)

func (*Hypervisor) SetConfigHash

func (h *Hypervisor) SetConfigHash(status *tfv1.PoolComponentStatus, hash string)

func (*Hypervisor) SetUpdateInProgressInfo

func (h *Hypervisor) SetUpdateInProgressInfo(pool *tfv1.GPUPool, hash string)

func (*Hypervisor) SetUpdateProgress

func (h *Hypervisor) SetUpdateProgress(status *tfv1.PoolComponentStatus, progress int32)

type Interface

type Interface interface {
	GetName() string
	DetectConfigChange(pool *tfv1.GPUPool, status *tfv1.PoolComponentStatus) (bool, string, string)
	SetConfigHash(status *tfv1.PoolComponentStatus, hash string)
	GetUpdateInProgressInfo(pool *tfv1.GPUPool) string
	SetUpdateInProgressInfo(pool *tfv1.GPUPool, hash string)
	GetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool) string
	SetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool, time string)
	GetUpdateProgress(status *tfv1.PoolComponentStatus) int32
	SetUpdateProgress(status *tfv1.PoolComponentStatus, progress int32)
	GetResourcesInfo(r client.Client, ctx context.Context, pool *tfv1.GPUPool, hash string) (int, int, bool, error)
	PerformBatchUpdate(r client.Client, ctx context.Context, pool *tfv1.GPUPool, delta int) (bool, error)
}

type TensorFusionWorkloadByCreationTimestamp

type TensorFusionWorkloadByCreationTimestamp []*tfv1.TensorFusionWorkload

func (TensorFusionWorkloadByCreationTimestamp) Len

func (TensorFusionWorkloadByCreationTimestamp) Less

func (TensorFusionWorkloadByCreationTimestamp) Swap

type Worker

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

func (*Worker) DetectConfigChange

func (w *Worker) DetectConfigChange(pool *tfv1.GPUPool, status *tfv1.PoolComponentStatus) (bool, string, string)

func (*Worker) GetBatchUpdateLastTimeInfo

func (w *Worker) GetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool) string

func (*Worker) GetName

func (w *Worker) GetName() string

func (*Worker) GetResourcesInfo

func (w *Worker) GetResourcesInfo(r client.Client, ctx context.Context, pool *tfv1.GPUPool, configHash string) (int, int, bool, error)

func (*Worker) GetUpdateInProgressInfo

func (w *Worker) GetUpdateInProgressInfo(pool *tfv1.GPUPool) string

func (*Worker) GetUpdateProgress

func (w *Worker) GetUpdateProgress(status *tfv1.PoolComponentStatus) int32

func (*Worker) PerformBatchUpdate

func (w *Worker) PerformBatchUpdate(r client.Client, ctx context.Context, pool *tfv1.GPUPool, delta int) (bool, error)

func (*Worker) SetBatchUpdateLastTimeInfo

func (w *Worker) SetBatchUpdateLastTimeInfo(pool *tfv1.GPUPool, time string)

func (*Worker) SetConfigHash

func (w *Worker) SetConfigHash(status *tfv1.PoolComponentStatus, hash string)

func (*Worker) SetUpdateInProgressInfo

func (w *Worker) SetUpdateInProgressInfo(pool *tfv1.GPUPool, hash string)

func (*Worker) SetUpdateProgress

func (w *Worker) SetUpdateProgress(status *tfv1.PoolComponentStatus, progress int32)

Jump to

Keyboard shortcuts

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