Documentation ¶
Overview ¶
Allows us to change out our storage format (json, yaml, msgpack, etc.)
Index ¶
- Constants
- Variables
- func DecodeInto(data []byte, obj MilpaObject) error
- func Encode(obj MilpaObject) (data []byte, err error)
- func ForAllUnits(pod *Pod, f func(unit *Unit))
- func ForAllUnitsWithError(pod *Pod, f func(unit *Unit) error) error
- func FormatLabelSelector(labelSelector *LabelSelector) string
- func GetPodIP(a []NetworkAddress) string
- func GetPrivateDNS(a []NetworkAddress) string
- func GetPrivateIP(a []NetworkAddress) string
- func GetPublicDNS(a []NetworkAddress) string
- func GetPublicIP(a []NetworkAddress) string
- func IsHostNetwork(securityContext *PodSecurityContext) bool
- func IsTerminalPodPhase(phase PodPhase) bool
- func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error)
- func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error)
- func SetAPIVersion(version string)
- type AttachParams
- type Capabilities
- type ConfigMapKeySelector
- type ConfigMapProjection
- type ConfigMapVolumeSource
- type ContainerPort
- type DNSPolicy
- type Duration
- type EmptyDir
- type EnvVar
- type Event
- type EventList
- type ExecAction
- type ExecParams
- type HTTPGetAction
- type HTTPHeader
- type Handler
- type HostAlias
- type HostPathType
- type HostPathVolumeSource
- type IndentingJsonCodec
- type JsonCodec
- type KeyToPath
- type LabelSelector
- type LabelSelectorOperator
- type LabelSelectorRequirement
- type LoadBalancerIngress
- type LoadBalancerStatus
- type LocalObjectReference
- type LogFile
- type LogFileList
- type Metrics
- type MetricsList
- type MilpaCodec
- type MilpaObject
- type NameGenerator
- type NamespaceMode
- type NamespaceOption
- type NetworkAddress
- func CopyAddresses(a []NetworkAddress) []NetworkAddress
- func DeletePublicAddresses(a []NetworkAddress) []NetworkAddress
- func NewNetworkAddresses(ip, dns string) []NetworkAddress
- func SetPodIP(ip string, a []NetworkAddress) []NetworkAddress
- func SetPrivateDNS(dns string, a []NetworkAddress) []NetworkAddress
- func SetPublicAddresses(ip, dns string, a []NetworkAddress) []NetworkAddress
- type NetworkAddressType
- type Node
- type NodeList
- type NodePhase
- type NodeSpec
- type NodeStatus
- type ObjectMeta
- type ObjectReference
- type PackagePath
- type PlacementSpec
- type Pod
- type PodDNSConfig
- type PodDNSConfigOption
- type PodList
- type PodParameters
- type PodPhase
- type PodSecurityContext
- type PodSpec
- type PodSpot
- type PodStatus
- type PodStatusReply
- type PodTemplateSpec
- type PortForwardParams
- type Probe
- type ProjectedVolumeSource
- type Protocol
- type RegistryCredentials
- type ResourceMetrics
- type ResourceSpec
- type RestartPolicy
- type RunCmdParams
- type SecretKeySelector
- type SecretProjection
- type SecretVolumeSource
- type SecurityContext
- type ServiceStatus
- type SpotPolicy
- type StorageCodec
- type StorageMedium
- type StorageType
- type Sysctl
- type TCPSocketAction
- type Time
- func (t Time) Add(d time.Duration) Time
- func (t Time) After(u Time) bool
- func (t Time) Before(u Time) bool
- func (in *Time) DeepCopy() *Time
- func (t *Time) DeepCopyInto(out *Time)
- func (t Time) Equal(u Time) bool
- func (t Time) IsZero() bool
- func (t Time) Rfc3339Copy() Time
- func (t Time) Sub(u Time) time.Duration
- type TypeMeta
- type TypeVersioner
- type URIScheme
- type Unit
- type UnitState
- type UnitStateRunning
- type UnitStateTerminated
- type UnitStateWaiting
- type UnitStatus
- type VersionInfo
- type VersioningCodec
- type Volume
- type VolumeMount
- type VolumeProjection
- type VolumeSource
Constants ¶
const ( ProjectedVolumeSourceDefaultMode int32 = 0644 SecretVolumeSourceDefaultMode int32 = 0644 ConfigMapVolumeSourceDefaultMode int32 = 0644 )
const (
ContainerInstanceType = "ContainerInstance"
)
Variables ¶
var (
LatestAPIVersion = "v1"
)
Functions ¶
func DecodeInto ¶
func DecodeInto(data []byte, obj MilpaObject) error
DecodeInto parses a JSON string and stores it in obj, which needs to be a pointer to a struct.
func Encode ¶
func Encode(obj MilpaObject) (data []byte, err error)
Encode encodes a struct or a struct pointer to a JSON string that can be persisted in a registry.
func ForAllUnits ¶
Run through all units in a pod and call f to modify each container
func ForAllUnitsWithError ¶
Run through all units in a pod and call f to modify each unit. Stop iterating if f returns an error.
func FormatLabelSelector ¶
func FormatLabelSelector(labelSelector *LabelSelector) string
FormatLabelSelector convert labelSelector into plain string
func GetPodIP ¶
func GetPodIP(a []NetworkAddress) string
func GetPrivateDNS ¶
func GetPrivateDNS(a []NetworkAddress) string
func GetPrivateIP ¶
func GetPrivateIP(a []NetworkAddress) string
func GetPublicDNS ¶
func GetPublicDNS(a []NetworkAddress) string
func GetPublicIP ¶
func GetPublicIP(a []NetworkAddress) string
func IsHostNetwork ¶
func IsHostNetwork(securityContext *PodSecurityContext) bool
func IsTerminalPodPhase ¶
func LabelSelectorAsMap ¶
func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error)
LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the original structure of a label selector. Operators that cannot be converted into plain labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in an error.
func LabelSelectorAsSelector ¶
func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error)
LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements labels.Selector Note: This function should be kept in sync with the selector methods in pkg/labels/selector.go
func SetAPIVersion ¶
func SetAPIVersion(version string)
Types ¶
type AttachParams ¶
func (*AttachParams) DeepCopy ¶
func (in *AttachParams) DeepCopy() *AttachParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachParams.
func (*AttachParams) DeepCopyInto ¶
func (in *AttachParams) DeepCopyInto(out *AttachParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Capabilities ¶
type Capabilities struct { // List of capabilities to add. Add []string `json:"add,omitempty"` // List of capabilities to drop. Drop []string `json:"drop,omitempty"` }
Capability contains the capabilities to add or drop.
func (*Capabilities) DeepCopy ¶
func (in *Capabilities) DeepCopy() *Capabilities
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Capabilities.
func (*Capabilities) DeepCopyInto ¶
func (in *Capabilities) DeepCopyInto(out *Capabilities)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigMapKeySelector ¶
type ConfigMapKeySelector struct { // The ConfigMap to select from. LocalObjectReference `json:",inline"` // The key to select. Key string `json:"key"` // Specify whether the ConfigMap or its key must be defined Optional *bool `json:"optional,omitempty"` }
Selects a key from a ConfigMap.
func (*ConfigMapKeySelector) DeepCopy ¶
func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector.
func (*ConfigMapKeySelector) DeepCopyInto ¶
func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigMapProjection ¶
type ConfigMapProjection struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` // If unspecified, each key-value pair in the Data field of the referenced // ConfigMap will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the ConfigMap, // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Specify whether the ConfigMap or its keys must be defined // +optional Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` }
Adapts a ConfigMap into a projected volume.
The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.
func (*ConfigMapProjection) DeepCopy ¶
func (in *ConfigMapProjection) DeepCopy() *ConfigMapProjection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapProjection.
func (*ConfigMapProjection) DeepCopyInto ¶
func (in *ConfigMapProjection) DeepCopyInto(out *ConfigMapProjection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigMapVolumeSource ¶
type ConfigMapVolumeSource struct { LocalObjectReference `json:",inline"` // If unspecified, each key-value pair in the Data field of the referenced // ConfigMap will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the ConfigMap, // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. Items []KeyToPath `json:"items,omitempty"` // Optional: mode bits to use on created files by default. Must be a // value between 0 and 0777. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. DefaultMode *int32 `json:"defaultMode,omitempty"` // Specify whether the ConfigMap or its keys must be defined Optional *bool `json:"optional,omitempty"` }
Adapts a ConfigMap into a volume.
The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.
func (*ConfigMapVolumeSource) DeepCopy ¶
func (in *ConfigMapVolumeSource) DeepCopy() *ConfigMapVolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapVolumeSource.
func (*ConfigMapVolumeSource) DeepCopyInto ¶
func (in *ConfigMapVolumeSource) DeepCopyInto(out *ConfigMapVolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerPort ¶
type ContainerPort struct { // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each // named port in a pod must have a unique name. Name for the port that can be // referred to by services. // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // Number of port to expose on the host. // If specified, this must be a valid port number, 0 < x < 65536. // If HostNetwork is specified, this must match ContainerPort. // Most containers do not need this. // +optional HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"` // Number of port to expose on the pod's IP address. // This must be a valid port number, 0 < x < 65536. ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"` // Protocol for port. Must be UDP, TCP, or SCTP. // Defaults to "TCP". // +optional Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"` // What host IP to bind the external port to. // +optional HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` }
ContainerPort represents a network port in a single container.
func (*ContainerPort) DeepCopy ¶
func (in *ContainerPort) DeepCopy() *ContainerPort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerPort.
func (*ContainerPort) DeepCopyInto ¶
func (in *ContainerPort) DeepCopyInto(out *ContainerPort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNSPolicy ¶
type DNSPolicy string
DNSPolicy defines how a pod's DNS will be configured.
const ( // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS // first, if it is available, then fall back on the default // (as determined by kubelet) DNS settings. DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet" // DNSClusterFirst indicates that the pod should use cluster DNS // first unless hostNetwork is true, if it is available, then // fall back on the default (as determined by kubelet) DNS settings. DNSClusterFirst DNSPolicy = "ClusterFirst" // DNSDefault indicates that the pod should use the default (as // determined by kubelet) DNS settings. DNSDefault DNSPolicy = "Default" // DNSNone indicates that the pod should use empty DNS settings. DNS // parameters such as nameservers and search paths should be defined via // DNSConfig. DNSNone DNSPolicy = "None" )
type Duration ¶
Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.
func (*Duration) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.
func (*Duration) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Duration) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface.
type EmptyDir ¶
type EmptyDir struct { // Backing medium for the emptyDir. The default is "" (to use disk // space). The other option is "Memory", for creating a tmpfs // volume. Medium StorageMedium `json:"medium,omitempty"` // SizeLimit is only meaningful for tmpfs. It is the size of the tmpfs // volume. SizeLimit int64 `json:"sizeLimit,omitempty"` }
EmptyDir is is disk or memory-backed Volume. Units can use it as scratch space, or for inter-unit communication (e.g. one Unit fetching files into an emptyDir, another running a webserver, serving these static files from the emptyDir).
func (*EmptyDir) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmptyDir.
func (*EmptyDir) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvVar ¶
type EnvVar struct { // Name of the environment variable. Name string `json:"name"` // Value of the environment variable. Value string `json:"value,omitempty"` }
Environment variables.
func (*EnvVar) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.
func (*EnvVar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Event ¶
type Event struct { TypeMeta `json:",inline,squash"` ObjectMeta `json:"metadata"` // The object that this event is about. InvolvedObject ObjectReference `json:"involvedObject"` // Should be a short, machine understandable string that describes the // current status of the referred object. This should not give the reason // for being in this state. Examples: "running", "cantStart", // "cantSchedule", "deleted". It's OK for components to make up statuses // to report here, but the same string should always be used for the same // status. Status string `json:"status,omitempty"` // The component reporting this Event. Should be a short machine // understandable string. Source string `json:"source,omitempty"` // Human readable message about what happened. Message string `json:"message,omitempty"` }
Event is a report of an event that happened in Milpa. They are stored separately from the objects they apply to.
func GetFakeEvent ¶
func GetFakeEvent() *Event
func (*Event) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.
func (*Event) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Event) IsMilpaObject ¶
func (p Event) IsMilpaObject()
type EventList ¶
A list of Events.
func NewEventList ¶
func NewEventList() *EventList
func (*EventList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.
func (*EventList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (EventList) IsMilpaObject ¶
func (p EventList) IsMilpaObject()
type ExecAction ¶
type ExecAction struct { // Command is the command line to execute inside the container, // the working directory for the command is root ('/') in the // container's filesystem. The command is simply exec'd, it is not // run inside a shell, so traditional shell instructions ('|', // etc) won't work. To use a shell, you need to explicitly call // out to that shell. Exit status of 0 is treated as live/healthy // and non-zero is unhealthy. Command []string `json:"command,omitempty"` }
ExecAction describes a "run in container" action.
func (*ExecAction) DeepCopy ¶
func (in *ExecAction) DeepCopy() *ExecAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecAction.
func (*ExecAction) DeepCopyInto ¶
func (in *ExecAction) DeepCopyInto(out *ExecAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecParams ¶
type ExecParams struct { PodName string UnitName string Command []string Interactive bool TTY bool SkipNSEnter bool }
func (*ExecParams) DeepCopy ¶
func (in *ExecParams) DeepCopy() *ExecParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecParams.
func (*ExecParams) DeepCopyInto ¶
func (in *ExecParams) DeepCopyInto(out *ExecParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPGetAction ¶
type HTTPGetAction struct { // Path to access on the HTTP server. Path string `json:"path,omitempty"` // Name or number of the port to access on the container. // Number must be in the range 1 to 65535. // Name must be an IANA_SVC_NAME. Port intstr.IntOrString `json:"port"` // Host name to connect to, defaults to the pod IP. You probably want to set // "Host" in httpHeaders instead. Host string `json:"host,omitempty"` // Scheme to use for connecting to the host. // Defaults to HTTP. Scheme URIScheme `json:"scheme,omitempty"` // Custom headers to set in the request. HTTP allows repeated headers. // +optional HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"` }
HTTPGetAction describes an action based on HTTP Get requests.
func (*HTTPGetAction) DeepCopy ¶
func (in *HTTPGetAction) DeepCopy() *HTTPGetAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPGetAction.
func (*HTTPGetAction) DeepCopyInto ¶
func (in *HTTPGetAction) DeepCopyInto(out *HTTPGetAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPHeader ¶
type HTTPHeader struct { // The header field name Name string `json:"name"` // The header field value Value string `json:"value"` }
HTTPHeader describes a custom header to be used in HTTP probes
func (*HTTPHeader) DeepCopy ¶
func (in *HTTPHeader) DeepCopy() *HTTPHeader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeader.
func (*HTTPHeader) DeepCopyInto ¶
func (in *HTTPHeader) DeepCopyInto(out *HTTPHeader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Handler ¶
type Handler struct { // One and only one of the following should be specified. // Exec specifies the action to take. Exec *ExecAction `json:"exec,omitempty"` // HTTPGet specifies the http request to perform. HTTPGet *HTTPGetAction `json:"httpGet,omitempty"` // TCPSocket specifies an action involving a TCP port. // TCP hooks not yet supported TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"` }
Handler defines a specific action that should be taken
func (*Handler) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler.
func (*Handler) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostAlias ¶
type HostAlias struct { // IP address of the host file entry. IP string `json:"ip,omitempty"` // Hostnames for the above IP address. Hostnames []string `json:"hostnames,omitempty"` }
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.
func (*HostAlias) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAlias.
func (*HostAlias) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostPathType ¶
type HostPathType string
const ( // For backwards compatible, leave it empty if unset HostPathUnset HostPathType = "" // If nothing exists at the given path, an empty directory will be created there // as needed with file mode 0755, having the same group and ownership with Kubelet. HostPathDirectoryOrCreate HostPathType = "DirectoryOrCreate" // A directory must exist at the given path HostPathDirectory HostPathType = "Directory" // If nothing exists at the given path, an empty file will be created there // as needed with file mode 0644, having the same group and ownership with Kubelet. HostPathFileOrCreate HostPathType = "FileOrCreate" // A file must exist at the given path HostPathFile HostPathType = "File" // A UNIX socket must exist at the given path HostPathSocket HostPathType = "Socket" // A character device must exist at the given path HostPathCharDev HostPathType = "CharDevice" // A block device must exist at the given path HostPathBlockDev HostPathType = "BlockDevice" )
type HostPathVolumeSource ¶
type HostPathVolumeSource struct { // Path of the directory on the host. // If the path is a symlink, it will follow the link to the real path. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Path string `json:"path" protobuf:"bytes,1,opt,name=path"` // Type for HostPath Volume // Defaults to "" // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath // +optional Type *HostPathType `json:"type,omitempty" protobuf:"bytes,2,opt,name=type"` }
Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
func (*HostPathVolumeSource) DeepCopy ¶
func (in *HostPathVolumeSource) DeepCopy() *HostPathVolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPathVolumeSource.
func (*HostPathVolumeSource) DeepCopyInto ¶
func (in *HostPathVolumeSource) DeepCopyInto(out *HostPathVolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IndentingJsonCodec ¶
type IndentingJsonCodec struct {
JsonCodec
}
+k8s:deepcopy-gen=false
func (IndentingJsonCodec) Marshal ¶
func (c IndentingJsonCodec) Marshal(i interface{}) ([]byte, error)
type KeyToPath ¶
type KeyToPath struct { // The key to project. Key string `json:"key" protobuf:"bytes,1,opt,name=key"` // The relative path of the file to map the key to. // May not be an absolute path. // May not contain the path element '..'. // May not start with the string '..'. Path string `json:"path"` // Optional: mode bits to use on this file, must be a value between 0 // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. Mode *int32 `json:"mode,omitempty"` }
Maps a string key to a path within a volume.
func (*KeyToPath) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyToPath.
func (*KeyToPath) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelSelector ¶
type LabelSelector struct { // matchLabels is a map of {key,value} pairs. A single {key,value} in the // matchLabels map is equivalent to an element of matchExpressions, whose // key field is "key", the operator is "In", and the values array contains // only "value". The requirements are ANDed. MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` // matchExpressions is a list of label selector requirements. The // requirements are ANDed. MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` }
There are two different styles of label selectors used in versioned types: an older style which is represented as just a string in versioned types, and a newer style that is structured. LabelSelector is an internal representation for the latter style. A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
func ParseToLabelSelector ¶
func ParseToLabelSelector(selector string) (*LabelSelector, error)
ParseToLabelSelector parses a string representing a selector into a LabelSelector object. Note: This function should be kept in sync with the parser in pkg/labels/selector.go
func SetAsLabelSelector ¶
func SetAsLabelSelector(ls labels.Set) *LabelSelector
SetAsLabelSelector converts the labels.Set object into a LabelSelector api object.
func (*LabelSelector) DeepCopy ¶
func (in *LabelSelector) DeepCopy() *LabelSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelector.
func (*LabelSelector) DeepCopyInto ¶
func (in *LabelSelector) DeepCopyInto(out *LabelSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelSelectorOperator ¶
type LabelSelectorOperator string
A label selector operator is the set of operators that can be used in a selector requirement. Can be "in", "notIn", "exists" and "doesNotExist".
const ( LabelSelectorOpIn LabelSelectorOperator = "In" LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" LabelSelectorOpExists LabelSelectorOperator = "Exists" LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" )
type LabelSelectorRequirement ¶
type LabelSelectorRequirement struct { // key is the label key that the selector applies to. Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // operator represents a key's relationship to a set of values. Valid // operators ard In, NotIn, Exists and DoesNotExist. Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"` // values is an array of string values. If the operator is In or NotIn, the // values array must be non-empty. If the operator is Exists or // DoesNotExist, the values array must be empty. This array is replaced // during a strategic merge patch. Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` }
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
func (*LabelSelectorRequirement) DeepCopy ¶
func (in *LabelSelectorRequirement) DeepCopy() *LabelSelectorRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement.
func (*LabelSelectorRequirement) DeepCopyInto ¶
func (in *LabelSelectorRequirement) DeepCopyInto(out *LabelSelectorRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LoadBalancerIngress ¶
type LoadBalancerIngress struct { // IP is set for load-balancer ingress points that are IP based // (typically GCE or OpenStack load-balancers) // +optional IP string `json:"ip,omitempty"` // Hostname is set for load-balancer ingress points that are DNS // based such as AWS load-balancers. Hostname string `json:"hostname,omitempty"` }
LoadBalancerIngress represents the status of a load-balancer ingress point traffic intended for the Service should be sent to an ingress point.
func (*LoadBalancerIngress) DeepCopy ¶
func (in *LoadBalancerIngress) DeepCopy() *LoadBalancerIngress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerIngress.
func (*LoadBalancerIngress) DeepCopyInto ¶
func (in *LoadBalancerIngress) DeepCopyInto(out *LoadBalancerIngress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LoadBalancerStatus ¶
type LoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer; // traffic intended for the Service should be sent to these ingress points. Ingress []LoadBalancerIngress `json:"ingress,omitempty"` }
LoadBalancerStatus represents the status of a load-balancer.
func (*LoadBalancerStatus) DeepCopy ¶
func (in *LoadBalancerStatus) DeepCopy() *LoadBalancerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStatus.
func (*LoadBalancerStatus) DeepCopyInto ¶
func (in *LoadBalancerStatus) DeepCopyInto(out *LoadBalancerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalObjectReference ¶
type LocalObjectReference struct { //TODO: Add other useful fields. apiVersion, kind, uid? Name string `json:"name,omitempty"` }
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
func (*LocalObjectReference) DeepCopy ¶
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.
func (*LocalObjectReference) DeepCopyInto ¶
func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogFile ¶
type LogFile struct { TypeMeta `json:",inline,squash"` ObjectMeta `json:"metadata"` // The object that created this log. ParentObject ObjectReference `json:"parentObject,omitempty"` // The content of the logfile. If the logfile is long, this will // likely be the tail of the file. Content string `json:"Content,omitempty"` }
LogFile holds the log data created by a Pod Unit or a Node.
func GetFakeLog ¶
func GetFakeLog() *LogFile
func NewLogFile ¶
func NewLogFile() *LogFile
func (*LogFile) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogFile.
func (*LogFile) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (LogFile) IsMilpaObject ¶
func (p LogFile) IsMilpaObject()
type LogFileList ¶
A list of logfiles.
func NewLogFileList ¶
func NewLogFileList() *LogFileList
func (*LogFileList) DeepCopy ¶
func (in *LogFileList) DeepCopy() *LogFileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogFileList.
func (*LogFileList) DeepCopyInto ¶
func (in *LogFileList) DeepCopyInto(out *LogFileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (LogFileList) IsMilpaObject ¶
func (p LogFileList) IsMilpaObject()
type Metrics ¶
type Metrics struct { TypeMeta `json:",inline,squash"` ObjectMeta `json:"metadata"` // The time at the end of the metrics collection window. Timestamp Time `json:"timestamp,omitempty"` // The interval of time over which the metrics were collected: // [Timestamp-Window, Timestamp] Window Duration `json:"window,omitempty"` // A map of lower case metric names to metric values ResourceUsage ResourceMetrics `json:"resourceUsage,omitempty"` }
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metrics.
func (*Metrics) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Metrics) IsMilpaObject ¶
func (p Metrics) IsMilpaObject()
type MetricsList ¶
func NewMetricsList ¶
func NewMetricsList() *MetricsList
func (*MetricsList) DeepCopy ¶
func (in *MetricsList) DeepCopy() *MetricsList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsList.
func (*MetricsList) DeepCopyInto ¶
func (in *MetricsList) DeepCopyInto(out *MetricsList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MetricsList) IsMilpaObject ¶
func (p MetricsList) IsMilpaObject()
type MilpaCodec ¶
type MilpaCodec interface { Marshal(MilpaObject) ([]byte, error) Unmarshal([]byte, MilpaObject) error }
MilpaCodec is the codec used by the registry. It knows about types and versions and should know how to update versions. Internally this codec should use a StorageCodec for doing the actual serialization.
type MilpaObject ¶
type MilpaObject interface {
// Implement this to be a MilpaObject
IsMilpaObject()
}
func Decode ¶
func Decode(data []byte) (MilpaObject, error)
Decode decodes a JSON string to an internal type. The output is a struct pointer. This is where we can "upgrade" persisted objects to the latest API version.
type NameGenerator ¶
type NameGenerator interface { // GenerateName generates a valid name from the base name, adding a random suffix to the // the base. If base is valid, the returned name must also be valid. The generator is // responsible for knowing the maximum valid name length. GenerateName(base string) string }
NameGenerator generates names for objects. Some backends may have more information available to guide selection of new names and this interface hides those details.
var SimpleNameGenerator NameGenerator = simpleNameGenerator{}
SimpleNameGenerator is a generator that returns the name plus a random suffix of five alphanumerics when a name is requested. The string is guaranteed to not exceed the length of a standard Kubernetes name (63 characters)
type NamespaceMode ¶
type NamespaceMode int32
const ( // A POD namespace is common to all containers in a pod. // For example, a container with a PID namespace of POD expects to view // all of the processes in all of the containers in the pod. NamespaceModePod NamespaceMode = 0 // A CONTAINER namespace is restricted to a single container. // For example, a container with a PID namespace of CONTAINER expects to // view only the processes in that container. NamespaceModeContainer NamespaceMode = 1 // A NODE namespace is the namespace of the Kubernetes node. // For example, a container with a PID namespace of NODE expects to view // all of the processes on the host running the kubelet. NamespaceModeNode NamespaceMode = 2 )
type NamespaceOption ¶
type NamespaceOption struct { // Network namespace for this container/sandbox. // Note: There is currently no way to set CONTAINER scoped network in the Kubernetes API. // Namespaces currently set by the kubelet: POD, NODE Network NamespaceMode `json:"network,omitempty"` // PID namespace for this container/sandbox. // Note: The CRI default is POD, but the v1.PodSpec default is CONTAINER. // The kubelet's runtime manager will set this to CONTAINER explicitly for v1 pods. // Namespaces currently set by the kubelet: POD, CONTAINER, NODE Pid NamespaceMode `json:"pid,omitempty"` // IPC namespace for this container/sandbox. // Note: There is currently no way to set CONTAINER scoped IPC in the Kubernetes API. // Namespaces currently set by the kubelet: POD, NODE Ipc NamespaceMode `json:"ipc,omitempty"` }
NamespaceOption provides options for Linux namespaces.
func (*NamespaceOption) DeepCopy ¶
func (in *NamespaceOption) DeepCopy() *NamespaceOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceOption.
func (*NamespaceOption) DeepCopyInto ¶
func (in *NamespaceOption) DeepCopyInto(out *NamespaceOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkAddress ¶
type NetworkAddress struct { Type NetworkAddressType `json:"type"` Address string `json:"address"` }
func CopyAddresses ¶
func CopyAddresses(a []NetworkAddress) []NetworkAddress
func DeletePublicAddresses ¶
func DeletePublicAddresses(a []NetworkAddress) []NetworkAddress
func NewNetworkAddresses ¶
func NewNetworkAddresses(ip, dns string) []NetworkAddress
func SetPodIP ¶
func SetPodIP(ip string, a []NetworkAddress) []NetworkAddress
func SetPrivateDNS ¶
func SetPrivateDNS(dns string, a []NetworkAddress) []NetworkAddress
func SetPublicAddresses ¶
func SetPublicAddresses(ip, dns string, a []NetworkAddress) []NetworkAddress
func (*NetworkAddress) DeepCopy ¶
func (in *NetworkAddress) DeepCopy() *NetworkAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkAddress.
func (*NetworkAddress) DeepCopyInto ¶
func (in *NetworkAddress) DeepCopyInto(out *NetworkAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkAddressType ¶
type NetworkAddressType string
const ( PublicIP NetworkAddressType = "PublicIP" PrivateIP NetworkAddressType = "PrivateIP" PodIP NetworkAddressType = "PodIP" PublicDNS NetworkAddressType = "PublicDNS" PrivateDNS NetworkAddressType = "PrivateDNS" )
type Node ¶
type Node struct { TypeMeta `json:",inline,squash"` // Object metadata. ObjectMeta `json:"metadata"` // Spec is the desired behavior of the Node. Spec NodeSpec `json:"spec"` // Status is the observed status of the Node. It is kept up to date by // Milpa. Status NodeStatus `json:"status"` }
Node is a cloud instance that can run a Pod.
func GetFakeNode ¶
func GetFakeNode() *Node
func (*Node) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.
func (*Node) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Node) IsMilpaObject ¶
func (p Node) IsMilpaObject()
type NodeList ¶
func NewNodeList ¶
func NewNodeList() *NodeList
func (*NodeList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.
func (*NodeList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NodeList) IsMilpaObject ¶
func (p NodeList) IsMilpaObject()
type NodePhase ¶
type NodePhase string
NodePhase is the last observed phase of the Node. Can be "creating", "created", "available", "claimed", "cleaning", "terminating" or "terminated".
type NodeSpec ¶
type NodeSpec struct { // Cloud instance type of this Node. InstanceType string `json:"instanceType"` // Cloud image that is used for this instance. BootImage string `json:"bootImage"` // Indicates that this Node has been requested to be terminated. Terminate bool `json:"terminate,omitempty"` // This is a spot cloud instance. Spot bool `json:"spot"` // Resource requirements necessary for booting this Node. If both // instanceType and memory and cpu resources are specified, // instanceType will take precedence. If the cloud provider // allows a variable number of CPUs/memory for an instance type, // the combination of resources and instance type will be used. Resources ResourceSpec `json:"resources,omitempty"` // Placement of the Node in the infrastructure. Placement PlacementSpec `json:"placement,omitempty"` }
NodeSpec defines the desired behavior of the Node.
func (*NodeSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.
func (*NodeSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeStatus ¶
type NodeStatus struct { // Phase is the last observed phase of the Node. Phase NodePhase `json:"phase"` // Cloud instance ID of this Node. InstanceID string `json:"instanceID"` // IP addresses and DNS names of this Node. Addresses []NetworkAddress `json:"addresses"` // If a Pod is bound to this Node, this is the name of that Pod. BoundPodName string `json:"boundPodName"` }
NodeStatus is the last observed status of a Node.
func (*NodeStatus) DeepCopy ¶
func (in *NodeStatus) DeepCopy() *NodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
func (*NodeStatus) DeepCopyInto ¶
func (in *NodeStatus) DeepCopyInto(out *NodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectMeta ¶
type ObjectMeta struct { // Name of the resource. Name string `json:"name"` // A dictionary of labels applied to this resource.. Labels map[string]string `json:"labels"` // Time of creation. CreationTimestamp Time `json:"creationTimestamp,omitempty"` // Time when the resource got deleted. DeletionTimestamp *Time `json:"deletionTimestamp,omitempty"` // Unused. Annotations map[string]string `json:"annotations,omitempty"` // Universal identifier in order to distinguish between different objects // that are named the same in differing timespans. E.g. if a user creates a // Pod named foo, then deletes and recreates the Pod, we need a way to tell // those two Pods apart. UID string `json:"uid,omitempty"` // Namespace placeholder. Currently Milpa does not support multiple // namespaces so this will always be set to "default". Namespace string `json:"namespace,omitempty"` }
ObjectMeta is metadata that is maintained for all persisted resources, which includes all objects users create. This is added and kept up to date by Milpa.
func (*ObjectMeta) Create ¶
func (meta *ObjectMeta) Create()
func (*ObjectMeta) DeepCopy ¶
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectReference ¶
type ObjectReference struct { Kind string `json:"kind,omitempty"` Name string `json:"name,omitempty"` UID string `json:"uid,omitempty"` }
ObjectReference contains enough information to be able to retrieve the object from the registry.
func ToObjectReference ¶
func ToObjectReference(resource interface{}) ObjectReference
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PackagePath ¶
type PackagePath struct { // Path of the directory or file on the host. Path string `json:"path"` }
Source for a file or directory from a package that will be mapped into the rootfs of a Unit.
func (*PackagePath) DeepCopy ¶
func (in *PackagePath) DeepCopy() *PackagePath
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackagePath.
func (*PackagePath) DeepCopyInto ¶
func (in *PackagePath) DeepCopyInto(out *PackagePath)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementSpec ¶
type PlacementSpec struct {
AvailabilityZone string `json:"availabilityZone,omitempty"`
}
func (*PlacementSpec) DeepCopy ¶
func (in *PlacementSpec) DeepCopy() *PlacementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSpec.
func (*PlacementSpec) DeepCopyInto ¶
func (in *PlacementSpec) DeepCopyInto(out *PlacementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pod ¶
type Pod struct { // "squash" tag is used by mapstructure instead of inline TypeMeta `json:",inline,squash"` // Object metadata. ObjectMeta `json:"metadata"` // Spec is the desired behavior of the pod. Spec PodSpec `json:"spec,omitempty"` // Status is the observed status of the Pod. It is kept up to date by // Milpa. Status PodStatus `json:"status,omitempty"` }
Pod is a collection of Units that run on the same Node.
func GetFakePod ¶
func GetFakePod() *Pod
func (*Pod) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.
func (*Pod) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Pod) IsMilpaObject ¶
func (p Pod) IsMilpaObject()
type PodDNSConfig ¶
type PodDNSConfig struct { // A list of DNS name server IP addresses. // This will be appended to the base nameservers generated from DNSPolicy. // Duplicated nameservers will be removed. // +optional Nameservers []string `json:"nameservers,omitempty" protobuf:"bytes,1,rep,name=nameservers"` // A list of DNS search domains for host-name lookup. // This will be appended to the base search paths generated from DNSPolicy. // Duplicated search paths will be removed. // +optional Searches []string `json:"searches,omitempty" protobuf:"bytes,2,rep,name=searches"` // A list of DNS resolver options. // This will be merged with the base options generated from DNSPolicy. // Duplicated entries will be removed. Resolution options given in Options // will override those that appear in the base DNSPolicy. // +optional Options []PodDNSConfigOption `json:"options,omitempty" protobuf:"bytes,3,rep,name=options"` }
PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.
func (*PodDNSConfig) DeepCopy ¶
func (in *PodDNSConfig) DeepCopy() *PodDNSConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfig.
func (*PodDNSConfig) DeepCopyInto ¶
func (in *PodDNSConfig) DeepCopyInto(out *PodDNSConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodDNSConfigOption ¶
type PodDNSConfigOption struct { // Required. Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // +optional Value *string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` }
PodDNSConfigOption defines DNS resolver options of a pod.
func (*PodDNSConfigOption) DeepCopy ¶
func (in *PodDNSConfigOption) DeepCopy() *PodDNSConfigOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfigOption.
func (*PodDNSConfigOption) DeepCopyInto ¶
func (in *PodDNSConfigOption) DeepCopyInto(out *PodDNSConfigOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodList ¶
func NewPodList ¶
func NewPodList() *PodList
func (*PodList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList.
func (*PodList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PodList) IsMilpaObject ¶
func (p PodList) IsMilpaObject()
type PodParameters ¶
type PodParameters struct { Secrets map[string]map[string][]byte `json:"secrets"` Credentials map[string]RegistryCredentials `json:"credentials"` Spec PodSpec `json:"spec"` PodName string NodeName string PodIP string PodHostname string }
func (*PodParameters) DeepCopy ¶
func (in *PodParameters) DeepCopy() *PodParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodParameters.
func (*PodParameters) DeepCopyInto ¶
func (in *PodParameters) DeepCopyInto(out *PodParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodPhase ¶
type PodPhase string
Phase is the last observed phase of the Pod. Can be "creating", "dispatching", "running", "succeeded", "failed" or "terminated".
const ( // PodWaiting means that we're waiting for the Pod to begin running. PodWaiting PodPhase = "Waiting" // PodDispatching means that we have a Node to put this Pod on // and we're in the process of starting the app on the Node. PodDispatching PodPhase = "Dispatching" // PodRunning means that the Pod is up and running. PodRunning PodPhase = "Running" // Pod succeeded means all the Units in the Pod returned success. It is a // terminal phase, i.e. the final phase when a Pod finished. Once the Pod // finished, Spec.Phase and Status.Phase are the same. PodSucceeded PodPhase = "Succeeded" // Pod has failed, either a Unit failed, or some other problem occurred // (e.g. dispatch error). This is a terminal phase. PodFailed PodPhase = "Failed" // PodTerminated means that the Pod has stopped by request. It is a // terminal phase. PodTerminated PodPhase = "Terminated" )
type PodSecurityContext ¶
type PodSecurityContext struct { // PID, IPC and network namespace sharing options. NamespaceOptions *NamespaceOption `json:"namespaceOptions,omitempty"` // UID to run pod processes as. RunAsUser *int64 `json:"runAsUser,omitempty"` // GID to run pod processes as. RunAsGroup *int64 `json:"runAsGroup,omitempty"` // List of groups applied to the first process run in the sandbox, in // addition to the pod's primary GID. SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` // Set these sysctls in the pod. Sysctls []Sysctl `json:"sysctls,omitempty"` }
func (*PodSecurityContext) DeepCopy ¶
func (in *PodSecurityContext) DeepCopy() *PodSecurityContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityContext.
func (*PodSecurityContext) DeepCopyInto ¶
func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSpec ¶
type PodSpec struct { // Desired condition of the Pod. Phase PodPhase `json:"phase"` // Restart policy for all Units in this Pod. It can be "always", // "onFailure" or "never". Default is "always". The restartPolicy // applies to all Units in the Pod. Exited Units are restarted // with an exponential back-off delay (10s, 20s, 40s …) capped at // five minutes, the delay is reset after 10 minutes. RestartPolicy RestartPolicy `json:"restartPolicy"` // List of Units that together compose this Pod. Units []Unit `json:"units"` // Init Units. They are run in order, one at a time before regular Units // are started. InitUnits []Unit `json:"initUnits"` // List of Secrets that will be used for authenticating when pulling // images. ImagePullSecrets []string `json:"imagePullSecrets,omitemtpy"` // Type of cloud instance type that will be used to run this Pod. InstanceType string `json:"instanceType,omitempty"` // PodSpot is the policy that determines if a spot instance may be used for // a Pod. Spot PodSpot `json:"spot,omitempty"` // Resource requirements for the Node that will run this Pod. If both // instanceType and resources are specified, instanceType will take // precedence. Resources ResourceSpec `json:"resources,omitempty"` // Placement is used to specify where a Pod will be place in the // infrastructure. Placement PlacementSpec `json:"placement,omitempty"` // List of volumes that will be made available to the Pod. Units can then // attach any of these mounts. Volumes []Volume `json:"volumes,omitempty"` // Pod security context. SecurityContext *PodSecurityContext `json:"securityContext,omitempty"` // Pod DNS policy. DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty"` // Pod DNS config. DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. // +optional Hostname string `json:"hostname,omitempty"` // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>". // If not specified, the pod will not have a domainname at all. // +optional Subdomain string `json:"subdomain,omitempty"` // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts // file if specified. This is only valid for non-hostNetwork pods. // +optional // +patchMergeKey=ip // +patchStrategy=merge HostAliases []HostAlias `json:"hostAliases,omitempty"` }
func (*PodSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSpot ¶
type PodSpot struct { // Spot policy. Can be "always", "preferred" or "never", meaning to always // use a spot instance, use one when available, or never use a spot // instance for running a Pod. Policy SpotPolicy `json:"policy"` }
PodSpot is the policy that determines if a spot instance may be used for a Pod.
func (*PodSpot) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpot.
func (*PodSpot) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodStatus ¶
type PodStatus struct { // Phase is the last observed phase of the Pod. Can be "creating", // "dispatching", "running", "succeeded", "failed" or "terminated". Phase PodPhase `json:"phase"` // Time of the last phase change LastPhaseChange Time `json:"lastPhaseChange"` // Name of the node running this Pod. BoundNodeName string `json:"boundNodeName"` // ID of the node running this Pod. BoundInstanceID string `json:"boundInstanceID"` // IP addresses and DNS names of the Node running this Pod. Addresses []NetworkAddress `json:"addresses"` // Number of failures encountered while Milpa tried to start a Pod. StartFailures int `json:"startFailures"` // Shows the status of the Units on the Pod with one entry for // each Unit in the Pod's Spec. UnitStatuses []UnitStatus `json:"unitStatuses"` // Shows the status of the init Units on the Pod with one entry for each // init Unit in the Pod's Spec. InitUnitStatuses []UnitStatus `json:"initUnitStatuses"` }
Last observed status of the Pod. This is maintained by the system.
func (*PodStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.
func (*PodStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodStatusReply ¶
type PodStatusReply struct { UnitStatuses []UnitStatus `json:"unitStatus"` InitUnitStatuses []UnitStatus `json:"initUnitStatus"` ResourceUsage ResourceMetrics `json:"resourceUsage,omitempty"` PodIP string `json:"podIP"` }
func (*PodStatusReply) DeepCopy ¶
func (in *PodStatusReply) DeepCopy() *PodStatusReply
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatusReply.
func (*PodStatusReply) DeepCopyInto ¶
func (in *PodStatusReply) DeepCopyInto(out *PodStatusReply)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodTemplateSpec ¶
type PodTemplateSpec struct { // Object metadata. ObjectMeta `json:"metadata"` // Spec defines the behavior of a Pod. Spec PodSpec `json:"spec,omitempty"` }
PodTemplateSpec is the object that describes the Pod that will be created if insufficient replicas are detected.
func (*PodTemplateSpec) DeepCopy ¶
func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateSpec.
func (*PodTemplateSpec) DeepCopyInto ¶
func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PortForwardParams ¶
func (*PortForwardParams) DeepCopy ¶
func (in *PortForwardParams) DeepCopy() *PortForwardParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortForwardParams.
func (*PortForwardParams) DeepCopyInto ¶
func (in *PortForwardParams) DeepCopyInto(out *PortForwardParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Probe ¶
type Probe struct { // The action taken to determine the health of a container Handler `json:",inline"` // Number of seconds after the container has started before // liveness probes are initiated. More info: // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` // Number of seconds after which the probe times out. Defaults to // 1 second. Minimum value is 1. More info: // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` // How often (in seconds) to perform the probe. Default to 10 // seconds. Minimum value is 1. PeriodSeconds int32 `json:"periodSeconds,omitempty"` // Minimum consecutive successes for the probe to be considered // successful after having failed. Defaults to 1. Must be 1 for // liveness. Minimum value is 1. SuccessThreshold int32 `json:"successThreshold,omitempty"` // Minimum consecutive failures for the probe to be considered // failed after having succeeded. Defaults to 3. Minimum value is // 1. FailureThreshold int32 `json:"failureThreshold,omitempty"` }
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
func (*Probe) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe.
func (*Probe) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectedVolumeSource ¶
type ProjectedVolumeSource struct { // list of volume projections Sources []VolumeProjection `json:"sources"` // Mode bits to use on created files by default. Must be a value between // 0 and 0777. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 `json:"defaultMode,omitempty"` }
Represents a projected volume source
func (*ProjectedVolumeSource) DeepCopy ¶
func (in *ProjectedVolumeSource) DeepCopy() *ProjectedVolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectedVolumeSource.
func (*ProjectedVolumeSource) DeepCopyInto ¶
func (in *ProjectedVolumeSource) DeepCopyInto(out *ProjectedVolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Protocol ¶
type Protocol string
Protocol defines network protocols supported for things like ports.
func MakeProtocol ¶
type RegistryCredentials ¶
type RegistryCredentials struct { Server string `json:"server"` Username string `json:"username"` Password string `json:"password"` }
func (*RegistryCredentials) DeepCopy ¶
func (in *RegistryCredentials) DeepCopy() *RegistryCredentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryCredentials.
func (*RegistryCredentials) DeepCopyInto ¶
func (in *RegistryCredentials) DeepCopyInto(out *RegistryCredentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceMetrics ¶
func (ResourceMetrics) DeepCopy ¶
func (in ResourceMetrics) DeepCopy() ResourceMetrics
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMetrics.
func (ResourceMetrics) DeepCopyInto ¶
func (in ResourceMetrics) DeepCopyInto(out *ResourceMetrics)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct { // The number of cpus on the instance. Must be a string but can // be a fractional amount to accomodate shared cpu instance types // (e.g. 0.5) CPU string `json:"cpu,omitempty"` // The quantity of memory on the instance. Since this is a quantity // gigabytes should be expressed as "Gi". E.G. memory: "3Gi" Memory string `json:"memory,omitempty"` // Number of GPUs present on the instance. GPU string `json:"gpu,omitempty"` // Root volume size. Both AWS and GCE specify volumes in GiB. // However according to their docs, AWS will bill you in // GB. VolumeSize string `json:"volumeSize,omitempty"` // Request an instance with dedicated or non-shared CPU. For AWS // T2 instances have a shared CPU, all other instance families // have a dedicated CPU. Set dedicatedCPU to true if you do // not want Milpa to consider using a T2 instance for your Pod. DedicatedCPU bool `json:"dedicatedCPU,omitempty"` // Request unlimited CPU for T2 shared instance in AWS Only. // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-unlimited.html SustainedCPU *bool `json:"sustainedCPU,omitempty"` // If PrivateIPOnly is true, the Pod will be launched on a Node // without a public IP address. By default the Pod will run on // a Node with a public IP address. PrivateIPOnly bool `json:"privateIPOnly,omitempty"` // If ContainerInstance is true, the pod will be run as a cloud // container, in AWS, the pod will be run on Fargate{ ContainerInstance *bool `json:"containerInstance,omitempty"` }
ResourceSpec is used to specify resource requirements for the Node that will run a Pod.
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestartPolicy ¶
type RestartPolicy string
Restart policy for all Units in this Pod. It can be "always", "onFailure" or "never". Default is "always".
const ( RestartPolicyAlways RestartPolicy = "Always" RestartPolicyOnFailure RestartPolicy = "OnFailure" RestartPolicyNever RestartPolicy = "Never" )
type RunCmdParams ¶
type RunCmdParams struct {
Command []string
}
func (*RunCmdParams) DeepCopy ¶
func (in *RunCmdParams) DeepCopy() *RunCmdParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunCmdParams.
func (*RunCmdParams) DeepCopyInto ¶
func (in *RunCmdParams) DeepCopyInto(out *RunCmdParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶
type SecretKeySelector struct { // The Secret to select from. LocalObjectReference // The key of the Secret to select from. Must be a valid secret key. Key string `json:"key"` // Kubernetes allows optional Secrets. We can add that soon Optional *bool `json:"optional,omitempty"` }
SecretKeySelector selects a key of a Secret.
func (*SecretKeySelector) DeepCopy ¶
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretProjection ¶
type SecretProjection struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Specify whether the Secret or its key must be defined // +optional Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` }
Adapts a secret into a projected volume.
The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.
func (*SecretProjection) DeepCopy ¶
func (in *SecretProjection) DeepCopy() *SecretProjection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretProjection.
func (*SecretProjection) DeepCopyInto ¶
func (in *SecretProjection) DeepCopyInto(out *SecretProjection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretVolumeSource ¶
type SecretVolumeSource struct { // Name of the secret in the pod's namespace to use. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret // +optional SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"` // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a // value between 0 and 0777. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. DefaultMode *int32 `json:"defaultMode,omitempty"` // Specify whether the Secret or its keys must be defined Optional *bool `json:"optional,omitempty"` }
Adapts a Secret into a volume.
The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names.
func (*SecretVolumeSource) DeepCopy ¶
func (in *SecretVolumeSource) DeepCopy() *SecretVolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretVolumeSource.
func (*SecretVolumeSource) DeepCopyInto ¶
func (in *SecretVolumeSource) DeepCopyInto(out *SecretVolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityContext ¶
type SecurityContext struct { // Capabilities to add or drop. Capabilities *Capabilities `json:"capabilities,omitempty"` // UID to run unit processes as. RunAsUser *int64 `json:"runAsUser,omitempty"` // Username to run unit processes as. RunAsGroup *int64 `json:"runAsGroup,omitempty"` }
Optional security context that overrides whatever is set for the pod.
Example yaml:
securityContext:
capabilities: add: - NET_BIND_SERVICE drop: - ALL
func (*SecurityContext) DeepCopy ¶
func (in *SecurityContext) DeepCopy() *SecurityContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityContext.
func (*SecurityContext) DeepCopyInto ¶
func (in *SecurityContext) DeepCopyInto(out *SecurityContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceStatus ¶
type ServiceStatus struct { // LoadBalancer contains the current status of the load-balancer, // if one is present. LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty"` }
ServiceStatus represents the current status of a Service.
func (*ServiceStatus) DeepCopy ¶
func (in *ServiceStatus) DeepCopy() *ServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus.
func (*ServiceStatus) DeepCopyInto ¶
func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SpotPolicy ¶
type SpotPolicy string
Spot policy. Can be "always", "preferred" or "never", meaning to always use a spot instance, use one when available, or never use a spot instance for running a Pod.
const ( SpotAlways SpotPolicy = "Always" SpotNever SpotPolicy = "Never" )
type StorageCodec ¶
type StorageCodec interface { Marshal(interface{}) ([]byte, error) Unmarshal([]byte, interface{}) error }
Storage codec is the codec interface that's used to serialize and unserialize objects to and from a format that can be used by our storage system (etcd). Examples of possible codecs would be Json/msgpack/protobufs, etc.
type StorageMedium ¶
type StorageMedium string
Backing storage for Volumes.
const ( StorageMediumDefault StorageMedium = "" // Use default (disk). StorageMediumMemory StorageMedium = "Memory" // Use tmpfs. )
type StorageType ¶
type StorageType string
const ( StorageGP2 StorageType = "gp2" StorageStandardSSD StorageType = "StandardSSD" StandardPersistentDisk StorageType = "StandardPersistentDisk" )
type Sysctl ¶
type Sysctl struct { // Name of a property to set. Name string `json:"name"` // Value of a property to set. Value string `json:"value"` }
Sysctl defines a kernel parameter to be set.
func (*Sysctl) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sysctl.
func (*Sysctl) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TCPSocketAction ¶
type TCPSocketAction struct { // Number or name of the port to access on the container. // Number must be in the range 1 to 65535. // Name must be an IANA_SVC_NAME. Port intstr.IntOrString `json:"port"` // Optional: Host name to connect to, defaults to the pod IP. // +optional Host string `json:"host,omitempty"` }
TCPSocketAction describes an action based on opening a socket
func (*TCPSocketAction) DeepCopy ¶
func (in *TCPSocketAction) DeepCopy() *TCPSocketAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPSocketAction.
func (*TCPSocketAction) DeepCopyInto ¶
func (in *TCPSocketAction) DeepCopyInto(out *TCPSocketAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Time ¶
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
func (*Time) DeepCopyInto ¶
DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time type is effectively immutable in the time API, so it is safe to copy-by-assign, despite the presence of (unexported) Pointer fields.
func (Time) Rfc3339Copy ¶
Rfc3339Copy returns a copy of the Time at second-level precision.
type TypeMeta ¶
type TypeMeta struct { // Kind is a string value for the resource this object represents. Kind string `json:"kind,omitempty"` // APIVersion defines the versioned schema of this representation of an // object. APIVersion string `json:"apiVersion,omitempty"` }
TypeMeta is metadata information for API objects.
func (*TypeMeta) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeMeta.
func (*TypeMeta) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TypeMeta) GetAPIVersion ¶
type TypeVersioner ¶
type TypeVersioner interface {
GetAPIVersion() string
}
type URIScheme ¶
type URIScheme string
URIScheme identifies the scheme used for connection to a host for Get actions
type Unit ¶
type Unit struct { // Name of the Unit. Name string `json:"name"` // The Docker image that will be pulled for this Unit. Usual Docker // conventions are used to specify an image, see // **[https://docs.docker.com/engine/reference/commandline/tag/#extended-description](https://docs.docker.com/engine/reference/commandline/tag/#extended-description)** // for a detailed explanation on specifying an image. // // Examples: // // - `library/python:3.6-alpine` // // - `myregistry.local:5000/testing/test-image` // Image string `json:"image,omitempty"` // The command that will be run to start the Unit. If empty, the entrypoint // of the image will be used. See // https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell Command []string `json:"command,omitempty"` // Arguments to the command. If empty, the cmd from the image will be used. Args []string `json:"args,omitempty"` // List of environment variables that will be exported inside the Unit // before start the application. Env []EnvVar `json:"env,omitempty"` // A list of Volumes that will be attached to the Unit. VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` // A list of ports that will be opened up for this Unit. Ports []ContainerPort `json:"ports,omitempty"` // Working directory to change to before running the command for the Unit. WorkingDir string `json:"workingDir,omitempty"` // Unit security context. SecurityContext *SecurityContext `json:"securityContext,omitempty"` // Periodic probe of container liveness. Container will be // restarted if the probe fails. Cannot be updated. More info: // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes LivenessProbe *Probe `json:"livenessProbe,omitempty"` // Periodic probe of container service readiness. Container will // be removed from service endpoints if the probe fails. Cannot // be updated. More info: // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes ReadinessProbe *Probe `json:"readinessProbe,omitempty"` //StartupProbe indicates that the Pod has successfully //initialized. If specified, no other probes are executed until //this completes successfully. StartupProbe *Probe `json:"startupProbe,omitempty"` }
Units run applications. A Pod consists of one or more Units.
func AllPodUnits ¶
func (*Unit) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Unit.
func (*Unit) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnitState ¶
type UnitState struct { Waiting *UnitStateWaiting `json:"waiting,omitempty"` Running *UnitStateRunning `json:"running,omitempty"` Terminated *UnitStateTerminated `json:"terminated,omitempty"` }
UnitState holds a possible state of a Pod Unit. Only one of its members may be specified. If none of them is specified, the default one is UnitStateRunning.
func (*UnitState) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitState.
func (*UnitState) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnitStateRunning ¶
type UnitStateRunning struct {
StartedAt Time `json:"startedAt,omitempty"`
}
func (*UnitStateRunning) DeepCopy ¶
func (in *UnitStateRunning) DeepCopy() *UnitStateRunning
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitStateRunning.
func (*UnitStateRunning) DeepCopyInto ¶
func (in *UnitStateRunning) DeepCopyInto(out *UnitStateRunning)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnitStateTerminated ¶
type UnitStateTerminated struct { ExitCode int32 `json:"exitCode"` FinishedAt Time `json:"finishedAt,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` StartedAt Time `json:"startedAt,omitempty"` }
func (*UnitStateTerminated) DeepCopy ¶
func (in *UnitStateTerminated) DeepCopy() *UnitStateTerminated
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitStateTerminated.
func (*UnitStateTerminated) DeepCopyInto ¶
func (in *UnitStateTerminated) DeepCopyInto(out *UnitStateTerminated)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnitStateWaiting ¶
type UnitStateWaiting struct { Reason string `json:"reason,omitempty"` StartFailure bool `json:"startFailure,omitempty"` }
func (*UnitStateWaiting) DeepCopy ¶
func (in *UnitStateWaiting) DeepCopy() *UnitStateWaiting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitStateWaiting.
func (*UnitStateWaiting) DeepCopyInto ¶
func (in *UnitStateWaiting) DeepCopyInto(out *UnitStateWaiting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnitStatus ¶
type UnitStatus struct { Name string `json:"name"` State UnitState `json:"state,omitempty"` LastTerminationState UnitState `json:"lastState,omitempty"` RestartCount int32 `json:"restartCount"` Image string `json:"image"` Ready bool `json:"ready"` Started *bool `json:"started"` }
func (*UnitStatus) DeepCopy ¶
func (in *UnitStatus) DeepCopy() *UnitStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitStatus.
func (*UnitStatus) DeepCopyInto ¶
func (in *UnitStatus) DeepCopyInto(out *UnitStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VersionInfo ¶
type VersionInfo struct { Major string Minor string GitVersion string GitCommit string GitTreeState string }
func (*VersionInfo) DeepCopy ¶
func (in *VersionInfo) DeepCopy() *VersionInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionInfo.
func (*VersionInfo) DeepCopyInto ¶
func (in *VersionInfo) DeepCopyInto(out *VersionInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VersioningCodec ¶
type VersioningCodec struct{}
+k8s:deepcopy-gen=false
func (VersioningCodec) Marshal ¶
func (c VersioningCodec) Marshal(i MilpaObject) ([]byte, error)
func (VersioningCodec) Unmarshal ¶
func (c VersioningCodec) Unmarshal(data []byte, v MilpaObject) error
type Volume ¶
type Volume struct { // Name of the Volume. This is used when referencing a Volume from a Unit // definition. Name string `json:"name"` VolumeSource `json:",inline,omitempty,squash"` }
Definition for Volumes.
func (*Volume) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeMount ¶
type VolumeMount struct { // Name of the Volume to attach. Name string `json:"name"` // Path where this Volume will be attached inside the Unit. MountPath string `json:"mountPath"` }
VolumeMount specifies what Volumes to attach to the Unit and the path where they will be located inside the Unit.
func (*VolumeMount) DeepCopy ¶
func (in *VolumeMount) DeepCopy() *VolumeMount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMount.
func (*VolumeMount) DeepCopyInto ¶
func (in *VolumeMount) DeepCopyInto(out *VolumeMount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeProjection ¶
type VolumeProjection struct { // information about the secret data to project // +optional Secret *SecretProjection `json:"secret,omitempty"` // // information about the downwardAPI data to project // // +optional // DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty"` // information about the configMap data to project // +optional ConfigMap *ConfigMapProjection `json:"configMap,omitempty"` }
Projection that may be projected along with other supported volume types
func (*VolumeProjection) DeepCopy ¶
func (in *VolumeProjection) DeepCopy() *VolumeProjection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeProjection.
func (*VolumeProjection) DeepCopyInto ¶
func (in *VolumeProjection) DeepCopyInto(out *VolumeProjection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSource ¶
type VolumeSource struct { // If specified, an emptyDir will be created to back this Volume. EmptyDir *EmptyDir `json:"emptyDir,omitempty"` // This is a file or directory inside a package that will be mapped into // the rootfs of a Unit. PackagePath *PackagePath `json:"packagePath,omitempty"` // ConfigMap represents a configMap that should populate this volume ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"` // Secret represents a secret that should populate this volume. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret // +optional Secret *SecretVolumeSource `json:"secret,omitempty"` // HostPath represents a pre-existing file or directory on the host // machine that is directly exposed to the container. This is generally // used for system agents or other privileged things that are allowed // to see the host machine. Most containers will NOT need this. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath // +optional HostPath *HostPathVolumeSource `json:"hostPath,omitempty"` // Items for all in one resources secrets, configmaps, and downward API Projected *ProjectedVolumeSource `json:"projected,omitempty"` }
func (*VolumeSource) DeepCopy ¶
func (in *VolumeSource) DeepCopy() *VolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource.
func (*VolumeSource) DeepCopyInto ¶
func (in *VolumeSource) DeepCopyInto(out *VolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.