Documentation ¶
Index ¶
- type ConfigObjConfig
- type Constraint
- type Constraints
- type DeployConfig
- type External
- type FileObjectConfig
- type FileReferenceConfig
- type HealthCheckConfig
- type Placement
- type Resource
- type Resources
- type RestartPolicy
- type SecretConfig
- type ServiceConfig
- type ServiceConfigObjConfig
- type ServicePortConfig
- type ServiceSecretConfig
- type ServiceVolumeConfig
- type Stack
- type StackList
- type StackPhase
- type StackSpec
- type StackStatus
- type UpdateConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigObjConfig ¶
type ConfigObjConfig FileObjectConfig
ConfigObjConfig is the config for the swarm "Config" object
type Constraint ¶
Constraint defines a constraint and it's operator (== or !=)
type Constraints ¶
type Constraints struct { OperatingSystem *Constraint Architecture *Constraint Hostname *Constraint MatchLabels map[string]Constraint }
Constraints lists constraints that can be set on the service
type DeployConfig ¶
type DeployConfig struct { Mode string `yaml:"mode,omitempty"` Replicas templatetypes.UInt64OrTemplate `yaml:"template_replicas,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` UpdateConfig *UpdateConfig `yaml:"update_config,omitempty"` Resources Resources `yaml:"resources,omitempty"` RestartPolicy *RestartPolicy `yaml:"restart_policy,omitempty"` Placement Placement `yaml:"placement,omitempty"` }
DeployConfig is the deployment configuration for a service
type External ¶
type External struct { Name string `yaml:"name,omitempty"` External bool `yaml:"external,omitempty"` }
External identifies a Volume or Network as a reference to a resource that is not managed, and should already exist. External.name is deprecated and replaced by Volume.name
type FileObjectConfig ¶
type FileObjectConfig struct { Name string `yaml:"name,omitempty"` File string `yaml:"file,omitempty"` External External `yaml:"external,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` }
FileObjectConfig is a config type for a file used by a service
type FileReferenceConfig ¶
type FileReferenceConfig struct { Source string `yaml:"source,omitempty"` Target string `yaml:"target,omitempty"` UID string `yaml:"uid,omitempty"` GID string `yaml:"gid,omitempty"` Mode templatetypes.UInt64OrTemplate `yaml:"template_mode,omitempty"` }
FileReferenceConfig for a reference to a swarm file object
type HealthCheckConfig ¶
type HealthCheckConfig struct { Test []string `yaml:"test,omitempty"` Timeout templatetypes.DurationOrTemplate `yaml:"template_timeout,omitempty"` Interval templatetypes.DurationOrTemplate `yaml:"template_interval,omitempty"` Retries templatetypes.UInt64OrTemplate `yaml:"template_retries,omitempty"` }
HealthCheckConfig the healthcheck configuration for a service
type Placement ¶
type Placement struct {
Constraints *Constraints `yaml:"constraints,omitempty"`
}
Placement constraints for the service
type Resource ¶
type Resource struct { NanoCPUs string `yaml:"cpus,omitempty"` MemoryBytes templatetypes.UnitBytesOrTemplate `yaml:"template_memory,omitempty"` }
Resource is a resource to be limited or reserved
type Resources ¶
type Resources struct { Limits *Resource `yaml:"limits,omitempty"` Reservations *Resource `yaml:"reservations,omitempty"` }
Resources the resource limits and reservations
type RestartPolicy ¶
type RestartPolicy struct {
Condition string `yaml:"condition,omitempty"`
}
RestartPolicy is the service restart policy
type ServiceConfig ¶
type ServiceConfig struct { Name string `yaml:"name,omitempty"` CapAdd []string `yaml:"cap_add,omitempty"` CapDrop []string `yaml:"cap_drop,omitempty"` Command []string `yaml:"command,omitempty"` Configs []ServiceConfigObjConfig `yaml:"configs,omitempty"` Deploy DeployConfig `yaml:"deploy,omitempty"` Entrypoint []string `yaml:"entrypoint,omitempty"` Environment map[string]*string `yaml:"environment,omitempty"` ExtraHosts []string `yaml:"extra_hosts,omitempty"` Hostname string `yaml:"hostname,omitempty"` HealthCheck *HealthCheckConfig `yaml:"health_check,omitempty"` Image string `yaml:"image,omitempty"` Ipc string `yaml:"ipc,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Pid string `yaml:"pid,omitempty"` Ports []ServicePortConfig `yaml:"ports,omitempty"` Privileged templatetypes.BoolOrTemplate `yaml:"template_privileged,omitempty" yaml:"template_privileged,omitempty"` ReadOnly templatetypes.BoolOrTemplate `yaml:"template_read_only,omitempty"` Secrets []ServiceSecretConfig `yaml:"secrets,omitempty"` StdinOpen templatetypes.BoolOrTemplate `yaml:"template_stdin_open,omitempty"` StopGracePeriod templatetypes.DurationOrTemplate `yaml:"template_stop_grace_period,omitempty"` Tmpfs []string `yaml:"tmpfs,omitempty"` Tty templatetypes.BoolOrTemplate `yaml:"template_tty,omitempty"` User *int64 `yaml:"user,omitempty"` Volumes []ServiceVolumeConfig `yaml:"volumes,omitempty"` WorkingDir string `yaml:"working_dir,omitempty"` }
ServiceConfig is the configuration of one service
type ServiceConfigObjConfig ¶
type ServiceConfigObjConfig FileReferenceConfig
ServiceConfigObjConfig is the config obj configuration for a service
type ServicePortConfig ¶
type ServicePortConfig struct { Mode string `yaml:"mode,omitempty"` Target templatetypes.UInt64OrTemplate `yaml:"template_target,omitempty"` Published templatetypes.UInt64OrTemplate `yaml:"template_published,omitempty"` Protocol string `yaml:"protocol,omitempty"` }
ServicePortConfig is the port configuration for a service
type ServiceSecretConfig ¶
type ServiceSecretConfig FileReferenceConfig
ServiceSecretConfig is the secret configuration for a service
type ServiceVolumeConfig ¶
type ServiceVolumeConfig struct { Type string `yaml:"type,omitempty"` Source string `yaml:"source,omitempty"` Target string `yaml:"target,omitempty"` ReadOnly templatetypes.BoolOrTemplate `yaml:"template_read_only,omitempty"` }
ServiceVolumeConfig are references to a volume used by a service
type Stack ¶
type Stack struct { metav1.TypeMeta `yaml:",inline" yaml:",inline"` metav1.ObjectMeta `yaml:"metadata,omitempty" yaml:"metadata,omitempty"` Spec *StackSpec `yaml:"spec,omitempty"` Status *StackStatus `yaml:"status,omitempty"` }
Stack is v1beta2's representation of a Stack
func (*Stack) DeepCopyObject ¶
DeepCopyObject clones the stack
type StackList ¶
type StackList struct { metav1.TypeMeta `yaml:",inline"` metav1.ListMeta `yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []Stack `yaml:"items" protobuf:"bytes,2,rep,name=items"` }
StackList is a list of stacks
func (*StackList) DeepCopyObject ¶
DeepCopyObject clones the stack list
type StackPhase ¶
type StackPhase string
StackPhase is the deployment phase of a stack
const ( // StackAvailable means the stack is available. StackAvailable StackPhase = "Available" // StackProgressing means the deployment is progressing. StackProgressing StackPhase = "Progressing" // StackFailure is added in a stack when one of its members fails to be created // or deleted. StackFailure StackPhase = "Failure" )
These are valid conditions of a stack.
type StackSpec ¶
type StackSpec struct { Services []ServiceConfig `yaml:"services,omitempty"` Secrets map[string]SecretConfig `yaml:"secrets,omitempty"` Configs map[string]ConfigObjConfig `yaml:"configs,omitempty"` }
StackSpec defines the desired state of Stack
type StackStatus ¶
type StackStatus struct { // Current condition of the stack. // +optional Phase StackPhase `yaml:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=StackPhase"` // A human readable message indicating details about the stack. // +optional Message string `yaml:"message,omitempty" protobuf:"bytes,5,opt,name=message"` }
StackStatus defines the observed state of Stack
type UpdateConfig ¶
type UpdateConfig struct {
Parallelism templatetypes.UInt64OrTemplate `yaml:"template_paralellism,omitempty"`
}
UpdateConfig is the service update configuration