config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConfigFile           = "/etc/slurm-bridge/config.yaml"
	SlurmClientTimeout   = 5 * time.Minute
	SlurmCacheSyncPeriod = 30 * time.Second
)
View Source
const (
	DefaultClientQPS   float32 = 50
	DefaultClientBurst int     = 100
)

DefaultClientQPS and DefaultClientBurst match kube-scheduler's own default client, not client-go's much lower bare defaults.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SchedulerName            string                `json:"schedulerName" yaml:"schedulerName"`
	SlurmRestApi             string                `json:"slurmRestApi" yaml:"slurmRestApi"`
	ManagedNamespaces        []string              `json:"managedNamespaces" yaml:"managedNamespaces"`
	ManagedNamespaceSelector *metav1.LabelSelector `json:"managedNamespaceSelector" yaml:"managedNamespaceSelector"`
	MCSLabel                 string                `json:"mcsLabel" yaml:"mcsLabel"`
	Partition                string                `json:"partition" yaml:"partition"`
	DeviceProfiles           []DeviceProfileConfig `json:"deviceProfiles" yaml:"deviceProfiles"`
	// ClientQPS and ClientBurst configure the scheduler plugin's own
	// Kubernetes client (distinct from kube-scheduler's internal client).
	// Zero means unset and defaults to DefaultClientQPS/DefaultClientBurst.
	ClientQPS   float32 `json:"clientQPS,omitempty" yaml:"clientQPS,omitempty"`
	ClientBurst int     `json:"clientBurst,omitempty" yaml:"clientBurst,omitempty"`
}

func Unmarshal

func Unmarshal(in []byte) (*Config, error)

func (*Config) DRARegistry added in v1.3.0

func (c *Config) DRARegistry() (*dra.Registry, error)

DRARegistry converts the user-facing profile configuration into the runtime registry shared by all slurm-bridge components.

func (*Config) EffectiveClientQPSBurst added in v1.3.0

func (c *Config) EffectiveClientQPSBurst() (qps float32, burst int)

EffectiveClientQPSBurst returns the plugin client's configured QPS/Burst, falling back to DefaultClientQPS/DefaultClientBurst where unset.

func (*Config) ValidateScheduler added in v1.1.5

func (c *Config) ValidateScheduler() error

type DeviceProfileBackendConfig added in v1.3.0

type DeviceProfileBackendConfig struct {
	Type     string `json:"type" yaml:"type"`
	GRESName string `json:"gresName,omitempty" yaml:"gresName,omitempty"`
}

DeviceProfileBackendConfig selects how Slurm represents a device profile.

type DeviceProfileConfig added in v1.3.0

type DeviceProfileConfig struct {
	Name     string                     `json:"name" yaml:"name"`
	Driver   string                     `json:"driver" yaml:"driver"`
	Selector string                     `json:"selector" yaml:"selector"`
	Backend  DeviceProfileBackendConfig `json:"backend" yaml:"backend"`
}

DeviceProfileConfig is the user-facing YAML representation of a DRA device profile.

Jump to

Keyboard shortcuts

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