Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeDeploy = "Deployment" TypeCollaset = "CollaSet" )
View Source
const ( TypeJob = "Job" TypeService = "Service" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { // The templates of containers to be run. Containers map[string]container.Container `yaml:"containers,omitempty" json:"containers,omitempty"` // The number of containers that should be run. // Default is 2 to meet high availability requirements. Replicas int `yaml:"replicas,omitempty" json:"replicas,omitempty"` // Labels and annotations can be used to attach arbitrary metadata // as key-value pairs to resources. Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` // Secret Secrets map[string]Secret `json:"secrets,omitempty" yaml:"secrets,omitempty"` // Dirs configures one or more volumes to be mounted to the // specified folder. Dirs map[string]string `json:"dirs,omitempty" yaml:"dirs,omitempty"` }
Base defines set of attributes shared by different workload profile, e.g. Service and Job. You can inherit this Schema to reuse these common attributes.
type Job ¶
type Job struct { Base `yaml:",inline" json:",inline"` // The scheduling strategy in Cron format. // More info: https://en.wikipedia.org/wiki/Cron. Schedule string `yaml:"schedule,omitempty" json:"schedule,omitempty"` }
Job is a kind of workload profile that describes how to run your application code. This is typically used for tasks that take from a few seconds to a few days to complete.
type Service ¶
type Service struct { Base `yaml:",inline" json:",inline"` Type string `yaml:"type" json:"type"` // Ports describe the list of ports need getting exposed. Ports []network.Port `yaml:"ports,omitempty" json:"ports,omitempty"` }
Service is a kind of workload profile that describes how to run your application code. This is typically used for long-running web applications that should "never" go down, and handle short-lived latency-sensitive web requests, or events.
type Workload ¶
type Workload struct { Header `yaml:",inline" json:",inline"` *Service `yaml:",inline" json:",inline"` *Job `yaml:",inline" json:",inline"` }
func (Workload) MarshalJSON ¶
func (Workload) MarshalYAML ¶
func (*Workload) UnmarshalJSON ¶
func (*Workload) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.