config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleConfig

type AssumeRoleConfig struct {
	RoleARN    string `yaml:"roleArn"`
	ExternalID string `yaml:"externalId"`
}

AssumeRoleConfig is the assume role configuration.

type Config

type Config struct {
	PollingInterval time.Duration `yaml:"pollingInterval"`

	Job      JobConfig       `yaml:"job"`
	Notebook NotebooksConfig `yaml:"notebook"`

	ClusterManagerServerWorkerServiceAddr string `yaml:"clusterManagerServerWorkerServiceAddr"`
	JobManagerServerWorkerServiceAddr     string `yaml:"jobManagerServerWorkerServiceAddr"`
	FileManagerServerWorkerServiceAddr    string `yaml:"fileManagerServerWorkerServiceAddr"`
	ModelManagerServerWorkerServiceAddr   string `yaml:"modelManagerServerWorkerServiceAddr"`

	ObjectStore ObjectStoreConfig `yaml:"objectStore"`

	Debug DebugConfig `yaml:"debug"`

	KubernetesManager KubernetesManagerConfig `yaml:"kubernetesManager"`

	KueueIntegration KueueConfig `yaml:"kueueIntegration"`

	Worker WorkerConfig `yaml:"worker"`
}

Config is the configuration.

func Parse

func Parse(path string) (Config, error)

Parse parses the configuration file at the given path, returning a new Config struct.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration.

type DebugConfig

type DebugConfig struct {
	KubeconfigPath string `yaml:"kubeconfigPath"`
	Standalone     bool   `yaml:"standalone"`
}

DebugConfig is the debug configuration.

type JobConfig

type JobConfig struct {
	Image           string            `yaml:"image"`
	Version         string            `yaml:"version"`
	ImagePullPolicy corev1.PullPolicy `yaml:"imagePullPolicy"`
	NumGPUs         int               `yaml:"numGpus"`

	WandbAPIKeySecret WandbAPIKeySecretConfig `yaml:"wandbApiKeySecret"`
}

JobConfig is the job configuration.

type KubernetesManagerConfig

type KubernetesManagerConfig struct {
	EnableLeaderElection bool   `yaml:"enableLeaderElection"`
	LeaderElectionID     string `yaml:"leaderElectionID"`

	MetricsBindAddress string `yaml:"metricsBindAddress"`
	HealthBindAddress  string `yaml:"healthBindAddress"`
	PprofBindAddress   string `yaml:"pprofBindAddress"`
}

KubernetesManagerConfig is the Kubernetes manager configuration.

type KueueConfig

type KueueConfig struct {
	Enable bool `yaml:"enable"`

	DefaultQueueName string `yaml:"defaultQueueName"`
}

KueueConfig is the Kueue configuration.

type NotebooksConfig

type NotebooksConfig struct {
	LLMarinerBaseURL string `yaml:"llmarinerBaseUrl"`
	EnablePVC        bool   `yaml:"enablePvc"`
	StorageClassName string `yaml:"storageClassName"`
	StorageSize      string `yaml:"storageSize"`
	MountPath        string `yaml:"mountPath"`
}

NotebooksConfig is the notebooks configuration.

type ObjectStoreConfig

type ObjectStoreConfig struct {
	S3 S3Config `yaml:"s3"`
}

ObjectStoreConfig is the object store configuration.

type S3Config

type S3Config struct {
	EndpointURL string `yaml:"endpointUrl"`
	Region      string `yaml:"region"`
	Bucket      string `yaml:"bucket"`

	AssumeRole *AssumeRoleConfig `yaml:"assumeRole"`
}

S3Config is the S3 configuration.

type WandbAPIKeySecretConfig

type WandbAPIKeySecretConfig struct {
	Name string `yaml:"name"`
	Key  string `yaml:"key"`
}

WandbAPIKeySecretConfig is the W&B API key secret configuration.

type WorkerConfig

type WorkerConfig struct {
	TLS WorkerTLSConfig `yaml:"tls"`
}

WorkerConfig is the worker configuration.

type WorkerTLSConfig

type WorkerTLSConfig struct {
	Enable bool `yaml:"enable"`
}

WorkerTLSConfig is the worker TLS configuration.

Jump to

Keyboard shortcuts

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