Documentation
¶
Index ¶
Constants ¶
const ( ConfigFile = "/etc/slurm-bridge/config.yaml" SlurmClientTimeout = 5 * time.Minute SlurmCacheSyncPeriod = 30 * time.Second )
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 (*Config) DRARegistry ¶ added in v1.3.0
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
EffectiveClientQPSBurst returns the plugin client's configured QPS/Burst, falling back to DefaultClientQPS/DefaultClientBurst where unset.
func (*Config) ValidateScheduler ¶ added in v1.1.5
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.