cli

package
v0.0.8-internal Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExecFlags

func AddExecFlags(cmd *cobra.Command)

AddExecFlags adds flags that are needed for the execution of apply functions

func AddMetaFlags

func AddMetaFlags(cmd *cobra.Command)

AddMetaFlags adds flags that are needed for basic Kubernetes metadata

func AddSchedulingFlags

func AddSchedulingFlags(cmd *cobra.Command)

AddSchedulingFlags adds flags related to (Kueue) scheduling

func ApplyConfigToFlags

func ApplyConfigToFlags(cmd *cobra.Command, config *Config)

func BuildServeCmd

func BuildServeCmd() *cobra.Command

func BuildSubmitCmd

func BuildSubmitCmd() *cobra.Command

func GetExecFlags

func GetExecFlags() workloads.ExecFlags

func GetMetaFlags

func GetMetaFlags() workloads.MetaFlags

func GetSchedulingFlags

func GetSchedulingFlags() (*workloads.SchedulingFlags, error)

GetSchedulingFlags initializes the scheduling flags with the number of GPUs requested

func PreRunLoadConfig

func PreRunLoadConfig(cmd *cobra.Command, _ []string) error

func RunApply

func RunApply(workload workloads.Workload, workloadMeta any) error

RunApply prepares the workload and applies it

Types

type Config

type Config struct {
	DryRun                  bool   `yaml:"dryRun"`
	CreateNamespace         bool   `yaml:"createNamespace"`
	Path                    string `yaml:"path"`
	OverlayPath             string `yaml:"overlayPath"`
	GpuNodeLabelKey         string `yaml:"gpuNodeLabelKey"`
	Template                string `yaml:"template"`
	Name                    string `yaml:"name"`
	Namespace               string `yaml:"namespace"`
	Image                   string `yaml:"image"`
	ImagePullSecret         string `yaml:"imagePullSecret"`
	Version                 string `yaml:"version"`
	Gpus                    int    `yaml:"gpus"`
	RequestedReplicas       int    `yaml:"requestedReplicas"`
	RequestedGPUsPerReplica int    `yaml:"requestedGPUsPerReplica"`
}

func LoadConfigFromPath

func LoadConfigFromPath(path string) (*Config, error)

Jump to

Keyboard shortcuts

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