api

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 12 Imported by: 17

Documentation

Overview

Allows us to change out our storage format (json, yaml, msgpack, etc.)

Index

Constants

View Source
const (
	ProjectedVolumeSourceDefaultMode int32 = 0644
	SecretVolumeSourceDefaultMode    int32 = 0644
	ConfigMapVolumeSourceDefaultMode int32 = 0644
)
View Source
const (
	ContainerInstanceType = "ContainerInstance"
)

Variables

View Source
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

func ForAllUnits(pod *Pod, f func(unit *Unit))

Run through all units in a pod and call f to modify each container

func ForAllUnitsWithError

func ForAllUnitsWithError(pod *Pod, f func(unit *Unit) error) error

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 IsTerminalPodPhase(phase PodPhase) bool

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

type AttachParams struct {
	PodName     string
	UnitName    string
	Interactive bool
	TTY         bool
}

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 ConditionStatus added in v1.0.5

type ConditionStatus string

ConditionStatus defines conditions of resources

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

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

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

type Duration struct {
	time.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

func (in *Duration) DeepCopy() *Duration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.

func (*Duration) DeepCopyInto

func (in *Duration) DeepCopyInto(out *Duration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

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

func (in *EmptyDir) DeepCopy() *EmptyDir

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmptyDir.

func (*EmptyDir) DeepCopyInto

func (in *EmptyDir) DeepCopyInto(out *EmptyDir)

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

func (in *EnvVar) DeepCopy() *EnvVar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.

func (*EnvVar) DeepCopyInto

func (in *EnvVar) DeepCopyInto(out *EnvVar)

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 NewEvent

func NewEvent() *Event

func (*Event) DeepCopy

func (in *Event) DeepCopy() *Event

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.

func (*Event) DeepCopyInto

func (in *Event) DeepCopyInto(out *Event)

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

type EventList struct {
	TypeMeta `json:",inline"`
	Items    []*Event `json:"items"`
}

A list of Events.

func NewEventList

func NewEventList() *EventList

func (*EventList) DeepCopy

func (in *EventList) DeepCopy() *EventList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.

func (*EventList) DeepCopyInto

func (in *EventList) DeepCopyInto(out *EventList)

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

func (in *Handler) DeepCopy() *Handler

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler.

func (*Handler) DeepCopyInto

func (in *Handler) DeepCopyInto(out *Handler)

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

func (in *HostAlias) DeepCopy() *HostAlias

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAlias.

func (*HostAlias) DeepCopyInto

func (in *HostAlias) DeepCopyInto(out *HostAlias)

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

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 JsonCodec

type JsonCodec struct{}

+k8s:deepcopy-gen=false

func (JsonCodec) Marshal

func (c JsonCodec) Marshal(i interface{}) ([]byte, error)

func (JsonCodec) Unmarshal

func (c JsonCodec) Unmarshal(data []byte, v interface{}) 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

func (in *KeyToPath) DeepCopy() *KeyToPath

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyToPath.

func (*KeyToPath) DeepCopyInto

func (in *KeyToPath) DeepCopyInto(out *KeyToPath)

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

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 Lifecycle added in v1.0.5

type Lifecycle struct {
	// PostStart is called immediately after a container is created.  If the handler fails, the container
	// is terminated and restarted.
	// +optional
	PostStart *Handler
	// PreStop is called immediately before a container is terminated due to an
	// API request or management event such as liveness/startup probe failure,
	// preemption, resource contention, etc. The handler is not called if the
	// container crashes or exits. The reason for termination is passed to the
	// handler. The Pod's termination grace period countdown begins before the
	// PreStop hooked is executed. Regardless of the outcome of the handler, the
	// container will eventually terminate within the Pod's termination grace
	// period. Other management of the container blocks until the hook completes
	// or until the termination grace period is reached.
	// +optional
	PreStop *Handler
}

Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.

func (*Lifecycle) DeepCopy added in v1.1.0

func (in *Lifecycle) DeepCopy() *Lifecycle

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lifecycle.

func (*Lifecycle) DeepCopyInto added in v1.1.0

func (in *Lifecycle) DeepCopyInto(out *Lifecycle)

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

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

func (in *LogFile) DeepCopy() *LogFile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogFile.

func (*LogFile) DeepCopyInto

func (in *LogFile) DeepCopyInto(out *LogFile)

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

type LogFileList struct {
	TypeMeta `json:",inline"`
	Items    []*LogFile `json:"items"`
}

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

func (in *Metrics) DeepCopy() *Metrics

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metrics.

func (*Metrics) DeepCopyInto

func (in *Metrics) DeepCopyInto(out *Metrics)

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

type MetricsList struct {
	TypeMeta `json:",inline"`
	Items    []*Metrics
}

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 MountPropagationMode added in v1.0.5

type MountPropagationMode string

MountPropagationMode describes mount propagation.

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 NewNode

func NewNode() *Node

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

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

type NodeList struct {
	TypeMeta `json:",inline"`
	Items    []*Node `json:"items"`
}

func NewNodeList

func NewNodeList() *NodeList

func (*NodeList) DeepCopy

func (in *NodeList) DeepCopy() *NodeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.

func (*NodeList) DeepCopyInto

func (in *NodeList) DeepCopyInto(out *NodeList)

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".

const (
	NodeCreating    NodePhase = "Creating"
	NodeCreated     NodePhase = "Created"
	NodeAvailable   NodePhase = "Available"
	NodeClaimed     NodePhase = "Claimed"
	NodeCleaning    NodePhase = "Cleaning"
	NodeTerminating NodePhase = "Terminating"
	NodeTerminated  NodePhase = "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"`
	// This is a dedicated cloud instance
	Dedicated bool `json:"dedicated"`
	// 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"`
}

NodeSpec defines the desired behavior of the Node.

func (*NodeSpec) DeepCopy

func (in *NodeSpec) DeepCopy() *NodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.

func (*NodeSpec) DeepCopyInto

func (in *NodeSpec) DeepCopyInto(out *NodeSpec)

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 NewPod

func NewPod() *Pod

func (*Pod) DeepCopy

func (in *Pod) DeepCopy() *Pod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.

func (*Pod) DeepCopyInto

func (in *Pod) DeepCopyInto(out *Pod)

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 PodCondition added in v1.0.5

type PodCondition struct {
	Type   PodConditionType
	Status ConditionStatus
	// +optional
	LastProbeTime Time
	// +optional
	LastTransitionTime Time
	// +optional
	Reason string
	// +optional
	Message string
}

PodCondition represents pod's condition

func (*PodCondition) DeepCopy added in v1.1.0

func (in *PodCondition) DeepCopy() *PodCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCondition.

func (*PodCondition) DeepCopyInto added in v1.1.0

func (in *PodCondition) DeepCopyInto(out *PodCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodConditionType added in v1.0.5

type PodConditionType string

PodConditionType defines the condition of pod

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 PodFSGroupChangePolicy added in v1.0.5

type PodFSGroupChangePolicy string

PodFSGroupChangePolicy holds policies that will be used for applying fsGroup to a volume when volume is mounted.

type PodList

type PodList struct {
	TypeMeta `json:",inline"`
	Items    []*Pod `json:"items"`
}

func NewPodList

func NewPodList() *PodList

func (*PodList) DeepCopy

func (in *PodList) DeepCopy() *PodList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList.

func (*PodList) DeepCopyInto

func (in *PodList) DeepCopyInto(out *PodList)

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"`
	Annotations map[string]string
	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 PodQOSClass added in v1.0.5

type PodQOSClass string

PodQOSClass defines the supported qos classes of Pods.

type PodReadinessGate added in v1.0.5

type PodReadinessGate struct {
	// ConditionType refers to a condition in the pod's condition list with matching type.
	ConditionType PodConditionType
}

PodReadinessGate contains the reference to a pod condition

func (*PodReadinessGate) DeepCopy added in v1.1.0

func (in *PodReadinessGate) DeepCopy() *PodReadinessGate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodReadinessGate.

func (*PodReadinessGate) DeepCopyInto added in v1.1.0

func (in *PodReadinessGate) DeepCopyInto(out *PodReadinessGate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	// The SELinux context to be applied to all containers.
	// If unspecified, the container runtime will allocate a random SELinux context for each
	// container.  May also be set in SecurityContext.  If set in
	// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
	// takes precedence for that container.
	// +optional
	SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"`
	// The Windows specific settings applied to all containers.
	// If unspecified, the options within a container's SecurityContext will be used.
	// If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
	// +optional
	WindowsOptions *WindowsSecurityContextOptions `json:"windowsOptions,omitempty"`
	// Indicates that the container must run as a non-root user.
	// If true, the Kubelet will validate the image at runtime to ensure that it
	// does not run as UID 0 (root) and fail to start the container if it does.
	// If unset or false, no such validation will be performed.
	// May also be set in SecurityContext.  If set in both SecurityContext and
	// PodSecurityContext, the value specified in SecurityContext takes precedence.
	// +optional
	RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
	// A special supplemental group that applies to all containers in a pod.
	// Some volume types allow the Kubelet to change the ownership of that volume
	// to be owned by the pod:
	//
	// 1. The owning GID will be the FSGroup
	// 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
	// 3. The permission bits are OR'd with rw-rw----
	//
	// If unset, the Kubelet will not modify the ownership and permissions of any volume.
	// +optional
	FSGroup *int64 `json:"fsGroup,omitempty"`
	// fsGroupChangePolicy defines behavior of changing ownership and permission of the volume
	// before being exposed inside Pod. This field will only apply to
	// volume types which support fsGroup based ownership(and permissions).
	// It will have no effect on ephemeral volume types such as: secret, configmaps
	// and emptydir.
	// Valid values are "OnRootMismatch" and "Always". If not specified defaults to "Always".
	// +optional
	FSGroupChangePolicy *PodFSGroupChangePolicy `json:"fsGroupChangePolicy,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.
	// TODO - change to []core.LocalObjectReference
	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"`
	// Dedicated is a policy that determines if a dedicated host instance may
	// be used for a pod
	Dedicated bool `json:"dedicated,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"`
	// 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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	// List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing
	// pod to perform user-initiated actions such as debugging. This list cannot be specified when
	// creating a pod, and it cannot be modified by updating the pod spec. In order to add an
	// ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.
	// This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	EphemeralContainers []Unit `json:"ephemeralContainers,omitempty"`
	// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
	// Value must be non-negative integer. The value zero indicates delete immediately.
	// If this value is nil, the default grace period will be used instead.
	// The grace period is the duration in seconds after the processes running in the pod are sent
	// a termination signal and the time when the processes are forcibly halted with a kill signal.
	// Set this value longer than the expected cleanup time for your process.
	// Defaults to 30 seconds.
	// +optional
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
	// Optional duration in seconds the pod may be active on the node relative to
	// StartTime before the system will actively try to mark it failed and kill associated containers.
	// Value must be a positive integer.
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
	// +optional
	AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`

	// NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
	// the scheduler simply schedules this pod onto that node, assuming that it fits resource
	// requirements.
	// +optional
	NodeName string `json:"nodeName,omitempty"`
	// Host networking requested for this pod. Use the host's network namespace.
	// If this option is set, the ports that will be used must be specified.
	// Default to false.
	// +k8s:conversion-gen=false
	// +optional
	HostNetwork bool `json:"hostNetwork,omitempty"`
	// Use the host's pid namespace.
	// Optional: Default to false.
	// +k8s:conversion-gen=false
	// +optional
	HostPID bool `json:"hostPID,omitempty"`
	// Use the host's ipc namespace.
	// Optional: Default to false.
	// +k8s:conversion-gen=false
	// +optional
	HostIPC bool `json:"hostIPC,omitempty"`
	// Share a single process namespace between all of the containers in a pod.
	// When this is set containers will be able to view and signal processes from other containers
	// in the same pod, and the first process in each container will not be assigned PID 1.
	// HostPID and ShareProcessNamespace cannot both be set.
	// Optional: Default to false.
	// +k8s:conversion-gen=false
	// +optional
	ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty"`
	// If specified, the pod's scheduling constraints
	// +optional
	//Affinity *core.Affinity `json:"affinity,omitempty"`
	// If specified, the pod will be dispatched by specified scheduler.
	// If not specified, the pod will be dispatched by default scheduler.
	// +optional
	SchedulerName string `json:"schedulerName,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	//Tolerations []core.Toleration `json:"tolerations,omitempty"`
	// If specified, indicates the pod's priority. "system-node-critical" and
	// "system-cluster-critical" are two special keywords which indicate the
	// highest priorities with the former being the highest priority. Any other
	// name must be defined by creating a PriorityClass object with that name.
	// If not specified, the pod priority will be default or zero if there is no
	// default.
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty" protobuf:"bytes,24,opt,name=priorityClassName"`
	// The priority value. Various system components use this field to find the
	// priority of the pod. When Priority Admission Controller is enabled, it
	// prevents users from setting this field. The admission controller populates
	// this field from PriorityClassName.
	// The higher the value, the higher the priority.
	// +optional
	Priority *int32 `json:"priority,omitempty"`
	// If specified, all readiness gates will be evaluated for pod readiness.
	// A pod is ready when all its containers are ready AND
	// all conditions specified in the readiness gates have status equal to "True"
	// More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md
	// +optional
	ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty"`
	// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used
	// to run this pod.  If no RuntimeClass resource matches the named class, the pod will not be run.
	// If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an
	// empty definition that uses the default runtime handler.
	// More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
	// This is a beta feature as of Kubernetes v1.14.
	// +optional
	RuntimeClassName *string `json:"runtimeClassName,omitempty"`
	// EnableServiceLinks indicates whether information about services should be injected into pod's
	// environment variables, matching the syntax of Docker links.
	// Optional: Defaults to true.
	// +optional
	EnableServiceLinks *bool `json:"enableServiceLinks,omitempty" protobuf:"varint,30,opt,name=enableServiceLinks"`
	// PreemptionPolicy is the Policy for preempting pods with lower priority.
	// One of Never, PreemptLowerPriority.
	// Defaults to PreemptLowerPriority if unset.
	// This field is beta-level, gated by the NonPreemptingPriority feature-gate.
	// +optional
	PreemptionPolicy *PreemptionPolicy `json:"preemptionPolicy,omitempty"`
	// Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
	// This field will be autopopulated at admission time by the RuntimeClass admission controller. If
	// the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests.
	// The RuntimeClass admission controller will reject Pod create requests which have the overhead already
	// set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value
	// defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero.
	// More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
	// This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.
	// +optional
	Overhead ResourceList `json:"overhead,omitempty"`
	// TopologySpreadConstraints describes how a group of pods ought to spread across topology
	// domains. Scheduler will schedule pods in a way which abides by the constraints.
	// All topologySpreadConstraints are ANDed.
	// +optional
	// +patchMergeKey=topologyKey
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=topologyKey
	// +listMapKey=whenUnsatisfiable
	//TopologySpreadConstraints []core.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	// If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default).
	// In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname).
	// In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN.
	// If a pod does not have FQDN, this has no effect.
	// Default to false.
	// +optional
	SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty"`
}

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

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

func (in *PodSpot) DeepCopy() *PodSpot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpot.

func (*PodSpot) DeepCopyInto

func (in *PodSpot) DeepCopyInto(out *PodSpot)

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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	// +optional
	Conditions []PodCondition `json:"conditions,omitempty"`
	// A human readable message indicating details about why the pod is in this state.
	// +optional
	Message string `json:"message,omitempty"`
	// A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'
	// +optional
	Reason string `json:"reason,omitempty"`
	// nominatedNodeName is set when this pod preempts other pods on the node, but it cannot be
	// scheduled right away as preemption victims receive their graceful termination periods.
	// This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide
	// to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to
	// give the resources on this node to a higher priority pod that is created after preemption.
	// +optional
	NominatedNodeName string
	// +optional
	HostIP string

	// Date and time at which the object was acknowledged by the Kubelet.
	// This is before the Kubelet pulled the container image(s) for the pod.
	// +optional
	StartTime *Time `json:"startTime,omitempty"`
	// +optional
	QOSClass PodQOSClass `json:"QOSClass,omitempty"`
	// Status for any ephemeral containers that have run in this pod.
	// This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.
	// +optional
	EphemeralContainerStatuses []UnitStatus `json:"ephemeralContainerStatuses,omitempty"`
}

Last observed status of the Pod. This is maintained by the system.

func (*PodStatus) DeepCopy

func (in *PodStatus) DeepCopy() *PodStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.

func (*PodStatus) DeepCopyInto

func (in *PodStatus) DeepCopyInto(out *PodStatus)

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

type PortForwardParams struct {
	PodName string
	Port    string
}

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 PreemptionPolicy added in v1.0.5

type PreemptionPolicy string

PreemptionPolicy describes a policy for if/when to preempt a pod.

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

func (in *Probe) DeepCopy() *Probe

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe.

func (*Probe) DeepCopyInto

func (in *Probe) DeepCopyInto(out *Probe)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProcMountType added in v1.0.5

type ProcMountType string

ProcMountType defines the type of proc mount

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

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.

const (
	ProtocolTCP  Protocol = "TCP"
	ProtocolUDP  Protocol = "UDP"
	ProtocolSCTP Protocol = "SCTP"
	ProtocolICMP Protocol = "ICMP"
)

func MakeProtocol

func MakeProtocol(p string) Protocol

type PullPolicy added in v1.0.5

type PullPolicy string

PullPolicy describes a policy for if/when to pull a container image

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 ResourceList added in v1.0.5

type ResourceList map[ResourceName]resource.Quantity

ResourceList is a set of (resource name, quantity) pairs.

func (ResourceList) DeepCopy added in v1.1.0

func (in ResourceList) DeepCopy() ResourceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList.

func (ResourceList) DeepCopyInto added in v1.1.0

func (in ResourceList) DeepCopyInto(out *ResourceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceMetrics

type ResourceMetrics map[string]float64

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 ResourceName added in v1.0.5

type ResourceName string

ResourceName is the name identifying various resources in a ResourceList.

type ResourceRequirements added in v1.0.5

type ResourceRequirements struct {
	// Limits describes the maximum amount of compute resources allowed.
	// +optional
	Limits ResourceList
	// Requests describes the minimum amount of compute resources required.
	// If Request is omitted for a container, it defaults to Limits if that is explicitly specified,
	// otherwise to an implementation-defined value
	// +optional
	Requests ResourceList
}

ResourceRequirements describes the compute resource requirements.

func (*ResourceRequirements) DeepCopy added in v1.1.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirements.

func (*ResourceRequirements) DeepCopyInto added in v1.1.0

func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)

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 SELinuxOptions added in v1.0.5

type SELinuxOptions struct {
	// SELinux user label
	// +optional
	User string
	// SELinux role label
	// +optional
	Role string
	// SELinux type label
	// +optional
	Type string
	// SELinux level label.
	// +optional
	Level string
}

SELinuxOptions are the labels to be applied to the container.

func (*SELinuxOptions) DeepCopy added in v1.1.0

func (in *SELinuxOptions) DeepCopy() *SELinuxOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SELinuxOptions.

func (*SELinuxOptions) DeepCopyInto added in v1.1.0

func (in *SELinuxOptions) DeepCopyInto(out *SELinuxOptions)

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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	// Run container in privileged mode.
	// Processes in privileged containers are essentially equivalent to root on the host.
	// Defaults to false.
	// +optional
	Privileged *bool
	// The SELinux context to be applied to the container.
	// If unspecified, the container runtime will allocate a random SELinux context for each
	// container.  May also be set in PodSecurityContext.  If set in both SecurityContext and
	// PodSecurityContext, the value specified in SecurityContext takes precedence.
	// +optional
	SELinuxOptions *SELinuxOptions
	// The Windows specific settings applied to all containers.
	// If unspecified, the options from the PodSecurityContext will be used.
	// If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
	// +optional
	WindowsOptions *WindowsSecurityContextOptions
	// Indicates that the container must run as a non-root user.
	// If true, the Kubelet will validate the image at runtime to ensure that it
	// does not run as UID 0 (root) and fail to start the container if it does.
	// If unset or false, no such validation will be performed.
	// May also be set in PodSecurityContext.  If set in both SecurityContext and
	// PodSecurityContext, the value specified in SecurityContext takes precedence.
	// +optional
	RunAsNonRoot *bool
	// The read-only root filesystem allows you to restrict the locations that an application can write
	// files to, ensuring the persistent data can only be written to mounts.
	// +optional
	ReadOnlyRootFilesystem *bool
	// AllowPrivilegeEscalation controls whether a process can gain more
	// privileges than its parent process. This bool directly controls if
	// the no_new_privs flag will be set on the container process.
	// +optional
	AllowPrivilegeEscalation *bool
	// ProcMount denotes the type of proc mount to use for the containers.
	// The default is DefaultProcMount which uses the container runtime defaults for
	// readonly paths and masked paths.
	// +optional
	ProcMount *ProcMountType
}

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

func (in *Sysctl) DeepCopy() *Sysctl

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sysctl.

func (*Sysctl) DeepCopyInto

func (in *Sysctl) DeepCopyInto(out *Sysctl)

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 TerminationMessagePolicy added in v1.0.5

type TerminationMessagePolicy string

TerminationMessagePolicy describes how termination messages are retrieved from a container.

type Time

type Time struct {
	time.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 Date

func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time

Date returns the Time corresponding to the supplied parameters by wrapping time.Date.

func Now

func Now() Time

Now returns the current local time.

func Unix

func Unix(sec int64, nsec int64) Time

Unix returns the local time corresponding to the given Unix time by wrapping time.Unix.

func (Time) Add

func (t Time) Add(d time.Duration) Time

func (Time) After

func (t Time) After(u Time) bool

After reports whether the time instant t is before u.

func (Time) Before

func (t Time) Before(u Time) bool

Before reports whether the time instant t is before u.

func (*Time) DeepCopy

func (in *Time) DeepCopy() *Time

func (*Time) DeepCopyInto

func (t *Time) DeepCopyInto(out *Time)

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) Equal

func (t Time) Equal(u Time) bool

Equal reports whether the time instant t is equal to u.

func (Time) IsZero

func (t Time) IsZero() bool

IsZero returns true if the value is nil or time is zero.

func (Time) Rfc3339Copy

func (t Time) Rfc3339Copy() Time

Rfc3339Copy returns a copy of the Time at second-level precision.

func (Time) Sub

func (t Time) Sub(u Time) time.Duration

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) Create

func (meta *TypeMeta) Create()

func (*TypeMeta) DeepCopy

func (in *TypeMeta) DeepCopy() *TypeMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeMeta.

func (*TypeMeta) DeepCopyInto

func (in *TypeMeta) DeepCopyInto(out *TypeMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TypeMeta) GetAPIVersion

func (meta *TypeMeta) GetAPIVersion() string

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

const (
	// URISchemeHTTP means that the scheme used will be http://
	URISchemeHTTP URIScheme = "HTTP"
	// URISchemeHTTPS means that the scheme used will be https://
	URISchemeHTTPS URIScheme = "HTTPS"
)

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"`

	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	// +optional
	//EnvFrom []core.EnvFromSource `json:"envFrom,omitempty"`
	// Compute Resources required by this container.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	// +optional
	Resources ResourceRequirements `json:"resources,omitempty"`
	// volumeDevices is the list of block devices to be used by the container.
	// +patchMergeKey=devicePath
	// +patchStrategy=merge
	// +optional
	VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty"`
	// Actions that the management system should take in response to container lifecycle events.
	// Cannot be updated.
	// +optional
	Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
	// Optional: Path at which the file to which the container's termination message
	// will be written is mounted into the container's filesystem.
	// Message written is intended to be brief final status, such as an assertion failure message.
	// Will be truncated by the node if greater than 4096 bytes. The total message length across
	// all containers will be limited to 12kb.
	// Defaults to /dev/termination-log.
	// Cannot be updated.
	// +optional
	TerminationMessagePath string `json:"terminationMessagePath,omitempty"`
	// Indicate how the termination message should be populated. File will use the contents of
	// terminationMessagePath to populate the container status message on both success and failure.
	// FallbackToLogsOnError will use the last chunk of container log output if the termination
	// message file is empty and the container exited with an error.
	// The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
	// Defaults to File.
	// Cannot be updated.
	// +optional
	TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"`
	// Image pull policy.
	// One of Always, Never, IfNotPresent.
	// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
	// +optional
	ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty"`

	// Whether this container should allocate a buffer for stdin in the container runtime. If this
	// is not set, reads from stdin in the container will always result in EOF.
	// Default is false.
	// +optional
	Stdin bool `json:"stdin,omitempty"`
	// Whether the container runtime should close the stdin channel after it has been opened by
	// a single attach. When stdin is true the stdin stream will remain open across multiple attach
	// sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
	// first client attaches to stdin, and then remains open and accepts data until the client disconnects,
	// at which time stdin is closed and remains closed until the container is restarted. If this
	// flag is false, a container processes that reads from stdin will never receive an EOF.
	// Default is false
	// +optional
	StdinOnce bool `json:"stdinOnce,omitempty"`
	// Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
	// Default is false.
	// +optional
	TTY bool `json:"tty,omitempty"`
}

Units run applications. A Pod consists of one or more Units.

func AllPodUnits

func AllPodUnits(pod *Pod) []Unit

func (*Unit) DeepCopy

func (in *Unit) DeepCopy() *Unit

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Unit.

func (*Unit) DeepCopyInto

func (in *Unit) DeepCopyInto(out *Unit)

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

func (in *UnitState) DeepCopy() *UnitState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitState.

func (*UnitState) DeepCopyInto

func (in *UnitState) DeepCopyInto(out *UnitState)

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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	// Signal from the last termination of the container
	// +optional
	Signal int32 `json:"signal,omitempty"`
	// Container's ID in the format 'docker://<container_id>'
	// +optional
	ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"`
}

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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	// Message regarding why the container is not yet running.
	// +optional
	Message string `json:"message,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"`

	// NOT SUPPORTED YET, ADDED FOR CONFORMANCE
	ImageID string `json:"imageID,omitempty"`
	// +optional
	ContainerID string `json:"containerID,omitempty"`
}

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

func (in *Volume) DeepCopy() *Volume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeDevice added in v1.0.5

type VolumeDevice struct {
	// name must match the name of a persistentVolumeClaim in the pod
	Name string
	// devicePath is the path inside of the container that the device will be mapped to.
	DevicePath string
}

VolumeDevice describes a mapping of a raw block device within a container.

func (*VolumeDevice) DeepCopy added in v1.1.0

func (in *VolumeDevice) DeepCopy() *VolumeDevice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeDevice.

func (*VolumeDevice) DeepCopyInto added in v1.1.0

func (in *VolumeDevice) DeepCopyInto(out *VolumeDevice)

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"`

	// NOT YET SUPPORTED, ADDED FOR CONFORMANCE
	// Optional: Defaults to false (read-write).
	// +optional
	ReadOnly bool `json:"readOnly,omitempty"`
	// Path within the volume from which the container's volume should be mounted.
	// Defaults to "" (volume's root).
	// +optional
	SubPath string `json:"subPath,omitempty"`
	// mountPropagation determines how mounts are propagated from the host
	// to container and the other way around.
	// When not set, MountPropagationNone is used.
	// This field is beta in 1.10.
	// +optional
	MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty"`
	// Expanded path within the volume from which the container's volume should be mounted.
	// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
	// Defaults to "" (volume's root).
	// SubPathExpr and SubPath are mutually exclusive.
	// +optional
	SubPathExpr string `json:"subPathExpr,omitempty"`
}

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 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.

type WindowsSecurityContextOptions added in v1.0.5

type WindowsSecurityContextOptions struct {
	// GMSACredentialSpecName is the name of the GMSA credential spec to use.
	// +optional
	GMSACredentialSpecName *string

	// GMSACredentialSpec is where the GMSA admission webhook
	// (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the
	// GMSA credential spec named by the GMSACredentialSpecName field.
	// +optional
	GMSACredentialSpec *string

	// The UserName in Windows to run the entrypoint of the container process.
	// Defaults to the user specified in image metadata if unspecified.
	// May also be set in PodSecurityContext. If set in both SecurityContext and
	// PodSecurityContext, the value specified in SecurityContext takes precedence.
	// +optional
	RunAsUserName *string
}

WindowsSecurityContextOptions contain Windows-specific options and credentials.

func (*WindowsSecurityContextOptions) DeepCopy added in v1.1.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WindowsSecurityContextOptions.

func (*WindowsSecurityContextOptions) DeepCopyInto added in v1.1.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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