k8s

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLabelAccelerator = "network.topology.nvidia.com/accelerator"
	DefaultLabelLeaf        = "network.topology.nvidia.com/leaf"
	DefaultLabelSpine       = "network.topology.nvidia.com/spine"
	DefaultLabelCore        = "network.topology.nvidia.com/core"
)
View Source
const NAME = "k8s"

Variables

This section is empty.

Functions

func InitLabels

func InitLabels(accelerator, leaf, spine, core string)

func Loader

func Loader(_ context.Context, params engines.Config) (engines.Engine, *httperr.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 (*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, *httperr.Error)

func (*K8sEngine) GetComputeInstances

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

type Labeler

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

type Params added in v0.3.0

type Params struct {
	// NodeSelector (optional) specifies nodes participating in the topology
	NodeSelector map[string]string `mapstructure:"nodeSelector"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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