k8s

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLabelAccelerator = "network.topology.nvidia.com/accelerator"
	DefaultLabelBlock       = "network.topology.nvidia.com/block"
	DefaultLabelSpine       = "network.topology.nvidia.com/spine"
	DefaultLabelDatacenter  = "network.topology.nvidia.com/datacenter"
)
View Source
const NAME = "k8s"

Variables

This section is empty.

Functions

func InitLabels

func InitLabels(accelerator, block, spine, datacenter string)

func Loader

func Loader(ctx context.Context, config engines.Config) (engines.Engine, error)

func MergeNodeLabels

func MergeNodeLabels(node *corev1.Node, labels map[string]string)

func NamedLoader

func NamedLoader() (string, engines.Loader)

func NewTopologyLabeler

func NewTopologyLabeler() *topologyLabeler

Types

type K8sEngine

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

func New

func New() (*K8sEngine, error)

func (*K8sEngine) AddNodeLabels

func (eng *K8sEngine) AddNodeLabels(ctx context.Context, nodeName string, labels map[string]string) error

func (*K8sEngine) GenerateOutput

func (eng *K8sEngine) GenerateOutput(ctx context.Context, tree *topology.Vertex, params map[string]any) ([]byte, error)

func (*K8sEngine) GetComputeInstances

func (eng *K8sEngine) GetComputeInstances(ctx context.Context, _ engines.Environment) ([]topology.ComputeInstances, error)

type Labeler

type Labeler interface {
	AddNodeLabels(context.Context, string, map[string]string) error
}

Jump to

Keyboard shortcuts

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