Documentation
¶
Index ¶
Constants ¶
View Source
const (
ServiceTypeNodePort = "node-port"
)
Variables ¶
This section is empty.
Functions ¶
func GetNetSegment ¶ added in v0.7.0
Types ¶
type Compute ¶
type Compute struct {
Resources struct {
Cpu struct {
Units string `yaml:"units"`
} `yaml:"cpu"`
Memory struct {
Size string `yaml:"size"`
} `yaml:"memory"`
Storage struct {
Size string `yaml:"size"`
} `yaml:"storage"`
Gpu struct {
Model string `yaml:"model"`
Units string `yaml:"units"`
Size string `yaml:"size"`
} `yaml:"gpu"`
} `yaml:"resources"`
}
type ConfigFile ¶
type ContainerResource ¶
type ContainerResource struct {
Name string
Count int
ImageName string
Command []string
Args []string
Env []corev1.EnvVar
Ports []corev1.ContainerPort
ResourceLimit corev1.ResourceList
VolumeMounts ConfigFile
Depends []ContainerResource
ReadyCmd []string
GpuModel string
Models []ModelResource
ServiceType string
}
func HandlerYaml ¶
func HandlerYaml(yamlFilePath string) ([]ContainerResource, error)
type DeployYamlV2 ¶
type DeployYamlV2 struct {
Version string `yaml:"version"`
ServiceType string `yaml:"type"`
Services map[string]Service `yaml:"services"`
Profiles Profiles `yaml:"profiles"`
Deployment map[string]Deployment `yaml:"deployment"`
}
func (*DeployYamlV2) ServiceToK8sResource ¶
func (dy *DeployYamlV2) ServiceToK8sResource() ([]ContainerResource, error)
type Deployment ¶
type EthernetConfig ¶ added in v0.7.0
type EthernetConfig struct {
DHCP4 bool `yaml:"dhcp4,omitempty"`
Addresses []string `yaml:"addresses,omitempty"`
Gateway4 string `yaml:"gateway4,omitempty"`
Nameservers struct {
Addresses []string `yaml:"addresses,omitempty"`
Search []string `yaml:"search,omitempty"`
} `yaml:"nameservers,omitempty"`
}
type ModelResource ¶
type NetplanConfig ¶ added in v0.7.0
type NetplanConfig struct {
Network struct {
Ethernets map[string]EthernetConfig `yaml:"ethernets"`
Version int `yaml:"version"`
} `yaml:"network"`
}
type ParserYamlV2 ¶
type ParserYamlV2 struct {
// contains filtered or unexported fields
}
func (*ParserYamlV2) GetConfig ¶
func (p *ParserYamlV2) GetConfig() interface{}
func (*ParserYamlV2) Parse ¶
func (p *ParserYamlV2) Parse(yamlFile []byte) error
type Service ¶
type Service struct {
Name string
Image string `yaml:"image"`
Command []string `yaml:"command"`
Args []string `yaml:"args"`
Env []string `yaml:"env"`
Expose []Expose `yaml:"expose"`
DependsOn []string `yaml:"depends-on"`
Config struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
} `yaml:"config"`
ReadyCmd []string `yaml:"ready-cmd"`
Models []ModelResource `yaml:"models"`
}
Click to show internal directories.
Click to hide internal directories.