Adding description to some of the v1beta3 objects.

This commit is contained in:
Vishnu Kannan 2015-03-04 23:22:13 +00:00
parent a8dd10dab7
commit bd83093b0b

View File

@ -52,19 +52,19 @@ import (
type TypeMeta struct {
// Kind is a string value representing the REST resource this object represents.
// Servers may infer this from the endpoint the client submits requests to.
Kind string `json:"kind,omitempty"`
Kind string `json:"kind,omitempty" description:"kind of object, in CamelCase"`
// APIVersion defines the versioned schema of this representation of an object.
// Servers should convert recognized schemas to the latest internal value, and
// may reject unrecognized values.
APIVersion string `json:"apiVersion,omitempty"`
APIVersion string `json:"apiVersion,omitempty" description:"version of the schema the object should have"`
}
// ListMeta describes metadata that synthetic resources must have, including lists and
// various status objects.
type ListMeta struct {
// SelfLink is a URL representing this object.
SelfLink string `json:"selfLink,omitempty"`
SelfLink string `json:"selfLink,omitempty" description:"URL for the object"`
// An opaque value that represents the version of this response for use with optimistic
// concurrency and change monitoring endpoints. Clients must treat these values as opaque
@ -80,7 +80,7 @@ type ObjectMeta struct {
// some resources may allow a client to request the generation of an appropriate name
// automatically. Name is primarily intended for creation idempotence and configuration
// definition.
Name string `json:"name,omitempty"`
Name string `json:"name,omitempty" description:"string that identifies an object. Must be unique within a namespace"`
// GenerateName indicates that the name should be made unique by the server prior to persisting
// it. A non-empty value for the field indicates the name will be made unique (and the name
@ -99,15 +99,15 @@ type ObjectMeta struct {
// equivalent to the "default" namespace, but "default" is the canonical representation.
// Not all objects are required to be scoped to a namespace - the value of this field for
// those objects will be empty.
Namespace string `json:"namespace,omitempty"`
Namespace string `json:"namespace,omitempty" description:"namespace of the object"`
// SelfLink is a URL representing this object.
SelfLink string `json:"selfLink,omitempty"`
SelfLink string `json:"selfLink,omitempty" "URL for the object; populated by the system, read-only"`
// UID is the unique in time and space value for this object. It is typically generated by
// the server on successful creation of a resource and is not allowed to change on PUT
// operations.
UID types.UID `json:"uid,omitempty"`
UID types.UID `json:"uid,omitempty" description:"unique UUID across space and time; populated by the system; read-only"`
// An opaque value that represents the version of this resource. May be used for optimistic
// concurrency, change detection, and the watch operation on a resource or set of resources.
@ -118,16 +118,16 @@ type ObjectMeta struct {
// CreationTimestamp is a timestamp representing the server time when this object was
// created. It is not guaranteed to be set in happens-before order across separate operations.
// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
CreationTimestamp util.Time `json:"creationTimestamp,omitempty"`
CreationTimestamp util.Time `json:"creationTimestamp,omitempty" description:"RFC 3339 date and time at which the object was created; populated by the system, read-only; null for lists"`
// Labels are key value pairs that may be used to scope and select individual resources.
// TODO: replace map[string]string with labels.LabelSet type
Labels map[string]string `json:"labels,omitempty"`
Labels map[string]string `json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services"`
// Annotations are unstructured key value data stored with a resource that may be set by
// external tooling. They are not queryable and should be preserved when modifying
// objects.
Annotations map[string]string `json:"annotations,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" description:"map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects"`
}
const (
@ -173,7 +173,7 @@ const (
type Volume struct {
// Required: This must be a DNS_LABEL. Each volume in a pod must have
// a unique name.
Name string `json:"name"`
Name string `json:"name" description:"volume name; must be a DNS_LABEL and unique within the pod"`
// Source represents the location and type of a volume to mount.
// This is optional for now. If not specified, the Volume is implied to be an EmptyDir.
// This implied behavior is deprecated and will be removed in a future version.
@ -189,21 +189,21 @@ type VolumeSource struct {
// to see the host machine. Most containers will NOT need this.
// TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
// mount host directories as read/write.
HostPath *HostPathVolumeSource `json:"hostPath"`
HostPath *HostPathVolumeSource `json:"hostPath" description:"pre-existing host file or directory; generally for privileged system daemons or other agents tied to the host"`
// EmptyDir represents a temporary directory that shares a pod's lifetime.
EmptyDir *EmptyDirVolumeSource `json:"emptyDir"`
EmptyDir *EmptyDirVolumeSource `json:"emptyDir" description:"temporary directory that shares a pod's lifetime"`
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk"`
GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk" description:"GCE disk resource attached to the host machine on demand"`
// GitRepo represents a git repository at a particular revision.
GitRepo *GitRepoVolumeSource `json:"gitRepo"`
GitRepo *GitRepoVolumeSource `json:"gitRepo" description:"git repository at a particular revision"`
// Secret represents a secret that should populate this volume.
Secret *SecretVolumeSource `json:"secret"`
Secret *SecretVolumeSource `json:"secret" description:"secret to populate volume"`
}
// HostPathVolumeSource represents bare host directory volume.
type HostPathVolumeSource struct {
Path string `json:"path"`
Path string `json:"path" description:"path of the directory on the host"`
}
type EmptyDirVolumeSource struct{}
@ -225,27 +225,27 @@ const (
// A GCE PD can only be mounted as read/write once.
type GCEPersistentDiskVolumeSource struct {
// Unique name of the PD resource. Used to identify the disk in GCE
PDName string `json:"pdName"`
PDName string `json:"pdName" description:"unique name of the PD resource in GCE"`
// Required: Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
FSType string `json:"fsType,omitempty" description:"file system type to mount, such as ext4, xfs, ntfs"`
// Optional: Partition on the disk to mount.
// If omitted, kubelet will attempt to mount the device name.
// Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
Partition int `json:"partition,omitempty"`
Partition int `json:"partition,omitempty" description:"partition on the disk to mount (e.g., '1' for /dev/sda1); if omitted the plain device name (e.g., /dev/sda) will be mounted"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" description:"read-only if true, read-write otherwise (false or unspecified)"`
}
// GitRepoVolumeSource represents a volume that is pulled from git when the pod is created.
type GitRepoVolumeSource struct {
// Repository URL
Repository string `json:"repository"`
Repository string `json:"repository" description:"repository URL"`
// Commit hash, this is optional
Revision string `json:"revision"`
Revision string `json:"revision" description:"commit hash for the specified revision"`
}
// SecretVolumeSource adapts a Secret into a VolumeSource
@ -258,49 +258,49 @@ type SecretVolumeSource struct {
type ContainerPort struct {
// Optional: If specified, this must be a DNS_LABEL. Each named port
// in a pod must have a unique name.
Name string `json:"name,omitempty"`
Name string `json:"name,omitempty" description:"name for the port that can be referred to by services; must be a DNS_LABEL and unique without the pod"`
// Optional: If specified, this must be a valid port number, 0 < x < 65536.
HostPort int `json:"hostPort,omitempty"`
HostPort int `json:"hostPort,omitempty" description:"number of port to expose on the host; most containers do not need this"`
// Required: This must be a valid port number, 0 < x < 65536.
ContainerPort int `json:"containerPort"`
// Optional: Supports "TCP" and "UDP". Defaults to "TCP".
Protocol Protocol `json:"protocol,omitempty"`
ContainerPort int `json:"containerPort" description:"number of port to expose on the pod's IP address"`
// Optional: Defaults to "TCP".
Protocol Protocol `json:"protocol,omitempty" description:"protocol for port; must be UDP or TCP; TCP if unspecified"`
// Optional: What host IP to bind the external port to.
HostIP string `json:"hostIP,omitempty"`
HostIP string `json:"hostIP,omitempty" description:"host IP to bind the port to"`
}
// VolumeMount describes a mounting of a Volume within a container.
type VolumeMount struct {
// Required: This must match the Name of a Volume [above].
Name string `json:"name"`
Name string `json:"name" description:"name of the volume to mount"`
// Optional: Defaults to false (read-write).
ReadOnly bool `json:"readOnly,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" description:"mounted read-only if true, read-write otherwise (false or unspecified)"`
// Required.
MountPath string `json:"mountPath"`
MountPath string `json:"mountPath" description:"path within the container at which the volume should be mounted"`
}
// EnvVar represents an environment variable present in a Container.
type EnvVar struct {
// Required: This must be a C_IDENTIFIER.
Name string `json:"name"`
Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"`
// Optional: defaults to "".
Value string `json:"value,omitempty"`
Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"`
}
// HTTPGetAction describes an action based on HTTP Get requests.
type HTTPGetAction struct {
// Optional: Path to access on the HTTP server.
Path string `json:"path,omitempty"`
Path string `json:"path,omitempty" description:"path to access on the HTTP server"`
// Required: Name or number of the port to access on the container.
Port util.IntOrString `json:"port,omitempty"`
Port util.IntOrString `json:"port,omitempty" description:"number or name of the port to access on the container"`
// Optional: Host name to connect to, defaults to the pod IP.
Host string `json:"host,omitempty"`
Host string `json:"host,omitempty" description:"hostname to connect to; defaults to pod IP"`
}
// TCPSocketAction describes an action based on opening a socket
type TCPSocketAction struct {
// Required: Port to connect to.
Port util.IntOrString `json:"port,omitempty"`
Port util.IntOrString `json:"port,omitempty" description:"number of name of the port to access on the container"`
}
// ExecAction describes a "run in container" action.
@ -309,7 +309,7 @@ type ExecAction struct {
// 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.
Command []string `json:"command,omitempty"`
Command []string `json:"command,omitempty" description:"command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd, not run inside a shell; exit status of 0 is treated as live/healthy and non-zero is unhealthy"`
}
// Probe describes a liveness probe to be examined to the container.
@ -317,9 +317,9 @@ type Probe struct {
// The action taken to determine the health of a container
Handler `json:",inline"`
// Length of time before health checking is activated. In seconds.
InitialDelaySeconds int64 `json:"initialDelaySeconds,omitempty"`
InitialDelaySeconds int64 `json:"initialDelaySeconds,omitempty" description:"number of seconds after the container has started before liveness probes are initiated"`
// Length of time before health checking times out. In seconds.
TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"`
TimeoutSeconds int64 `json:"timeoutSeconds,omitempty" description:"number of seconds after which liveness probes timeout; defaults to 1 second"`
}
// PullPolicy describes a policy for if/when to pull a container image
@ -340,9 +340,9 @@ type CapabilityType string
// Capabilities represent POSIX capabilities that can be added or removed to a running container.
type Capabilities struct {
// Added capabilities
Add []CapabilityType `json:"add,omitempty"`
Add []CapabilityType `json:"add,omitempty" description:"added capabilities"`
// Removed capabilities
Drop []CapabilityType `json:"drop,omitempty"`
Drop []CapabilityType `json:"drop,omitempty" description:"droped capabilities"`
}
// ResourceRequirements describes the compute resource requirements.
@ -360,28 +360,28 @@ const (
type Container struct {
// Required: This must be a DNS_LABEL. Each container in a pod must
// have a unique name.
Name string `json:"name"`
Name string `json:"name" description:"name of the container; must be a DNS_LABEL and unique within the pod"`
// Required.
Image string `json:"image"`
Image string `json:"image" description:"Docker image name"`
// Optional: Defaults to whatever is defined in the image.
Command []string `json:"command,omitempty"`
Command []string `json:"command,omitempty" description:"command argv array; not executed within a shell; defaults to entrypoint or command in the image"`
// Optional: Defaults to Docker's default.
WorkingDir string `json:"workingDir,omitempty"`
Ports []ContainerPort `json:"ports,omitempty"`
Env []EnvVar `json:"env,omitempty"`
WorkingDir string `json:"workingDir,omitempty" description:"container's working directory; defaults to image's default"`
Ports []ContainerPort `json:"ports,omitempty" description:"list of ports to expose from the container"`
Env []EnvVar `json:"env,omitempty" description:"list of environment variables to set in the container"`
Resources ResourceRequirements `json:"resources,omitempty" description:"Compute Resources required by this container"`
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`
LivenessProbe *Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty"`
Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" description:"pod volumes to mount into the container's filesystem"`
LivenessProbe *Probe `json:"livenessProbe,omitempty" description:"periodic probe of container liveness; container will be restarted if the probe fails"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty" description:"periodic probe of container service readiness; container will be removed from service endpoints if the probe fails"`
Lifecycle *Lifecycle `json:"lifecycle,omitempty" description:"actions that the management system should take in response to container lifecycle events"`
// Optional: Defaults to /dev/termination-log
TerminationMessagePath string `json:"terminationMessagePath,omitempty"`
TerminationMessagePath string `json:"terminationMessagePath,omitempty" description:"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; defaults to /dev/termination-log"`
// Optional: Default to false.
Privileged bool `json:"privileged,omitempty"`
Privileged bool `json:"privileged,omitempty" description:"whether or not the container is granted privileged status; defaults to false"`
// Optional: Policy for pulling images for this container
ImagePullPolicy PullPolicy `json:"imagePullPolicy"`
ImagePullPolicy PullPolicy `json:"imagePullPolicy" description:"image pull policy; one of PullAlways, PullNever, PullIfNotPresent; defaults to PullAlways if :latest tag is specified, or PullIfNotPresent otherwise"`
// Optional: Capabilities for container.
Capabilities Capabilities `json:"capabilities,omitempty"`
Capabilities Capabilities `json:"capabilities,omitempty" description:"capabilities for container"`
}
// Handler defines a specific action that should be taken
@ -389,12 +389,12 @@ type Container struct {
type Handler struct {
// One and only one of the following should be specified.
// Exec specifies the action to take.
Exec *ExecAction `json:"exec,omitempty"`
Exec *ExecAction `json:"exec,omitempty" description:"exec-based handler"`
// HTTPGet specifies the http request to perform.
HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
HTTPGet *HTTPGetAction `json:"httpGet,omitempty" description:"HTTP-based handler"`
// TCPSocket specifies an action involving a TCP port.
// TODO: implement a realistic TCP lifecycle hook
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"`
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" description:"TCP-based handler; TCP hooks not yet supported"`
}
// Lifecycle describes actions that the management system should take in response to container lifecycle
@ -403,10 +403,10 @@ type Handler struct {
type Lifecycle struct {
// PostStart is called immediately after a container is created. If the handler fails, the container
// is terminated and restarted.
PostStart *Handler `json:"postStart,omitempty"`
PostStart *Handler `json:"postStart,omitempty" description:"called immediately after a container is started; if the handler fails, the container is terminated and restarted according to its restart policy; other management of the container blocks until the hook completes"`
// PreStop is called immediately before a container is terminated. The reason for termination is
// passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated.
PreStop *Handler `json:"preStop,omitempty"`
PreStop *Handler `json:"preStop,omitempty" description:"called before a container is terminated; the container is terminated after the handler completes; other management of the container blocks until the hook completes"`
}
type ConditionStatus string
@ -423,48 +423,47 @@ const (
type ContainerStateWaiting struct {
// Reason could be pulling image,
Reason string `json:"reason,omitempty"`
Reason string `json:"reason,omitempty" description:"(brief) reason the container is not yet running, such as pulling its image"`
}
type ContainerStateRunning struct {
StartedAt util.Time `json:"startedAt,omitempty"`
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which the container was last (re-)started"`
}
type ContainerStateTerminated struct {
ExitCode int `json:"exitCode"`
Signal int `json:"signal,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
StartedAt util.Time `json:"startedAt,omitempty"`
FinishedAt util.Time `json:"finishedAt,omitempty"`
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
}
// ContainerState holds a possible state of container.
// Only one of its members may be specified.
// If none of them is specified, the default one is ContainerStateWaiting.
type ContainerState struct {
Waiting *ContainerStateWaiting `json:"waiting,omitempty"`
Running *ContainerStateRunning `json:"running,omitempty"`
Termination *ContainerStateTerminated `json:"termination,omitempty"`
Waiting *ContainerStateWaiting `json:"waiting,omitempty" description:"details about a waiting container"`
Running *ContainerStateRunning `json:"running,omitempty" description:"details about a running container"`
Termination *ContainerStateTerminated `json:"termination,omitempty" description:"details about a terminated container"`
}
type ContainerStatus struct {
// TODO(dchen1107): Should we rename PodStatus to a more generic name or have a separate states
// defined for container?
State ContainerState `json:"state,omitempty"`
Ready bool `json:"ready"`
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
// Note that this is calculated from dead containers. But those containers are subject to
// garbage collection. This value will get capped at 5 by GC.
RestartCount int `json:"restartCount"`
// TODO(dchen1107): Introduce our own NetworkSettings struct here?
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
RestartCount int `json:"restartCount" description:"the number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed"`
// The IP of the Pod
// PodIP is deprecated and will be removed from v1beta3 once it becomes possible for the Kubelet to report PodStatus.
PodIP string `json:"podIP,omitempty"`
PodIP string `json:"podIP,omitempty" description:"pod's IP address"`
// TODO(dchen1107): Which image the container is running with?
// The image the container is running
Image string `json:"image"`
ImageID string `json:"imageID" description:"ID of the container's image"`
Image string `json:"image" description:"image of the container"`
ImageID string `json:"imageID" description:"ID of the container's image"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}
// PodPhase is a label for the condition of a pod at the current time.
@ -503,9 +502,9 @@ const (
// TODO: add LastTransitionTime, Reason, Message to match NodeCondition api.
type PodCondition struct {
// Type is the type of the condition
Type PodConditionType `json:"type"`
Type PodConditionType `json:"type" description:"kind of the condition"`
// Status is the status of the condition
Status ConditionStatus `json:"status"`
Status ConditionStatus `json:"status" description:"status of the condition, one of Full, None, Unknown"`
}
// PodInfo contains one entry for every container with available info.
@ -523,9 +522,9 @@ type RestartPolicy struct {
// Only one of the following restart policies may be specified.
// If none of the following policies is specified, the default one
// is RestartPolicyAlways.
Always *RestartPolicyAlways `json:"always,omitempty"`
OnFailure *RestartPolicyOnFailure `json:"onFailure,omitempty"`
Never *RestartPolicyNever `json:"never,omitempty"`
Always *RestartPolicyAlways `json:"always,omitempty" description:"always restart the container after termination"`
OnFailure *RestartPolicyOnFailure `json:"onFailure,omitempty" description:"restart the container if it fails for any reason, but not if it succeeds (exit 0)"`
Never *RestartPolicyNever `json:"never,omitempty" description:"never restart the container"`
}
// DNSPolicy defines how a pod's DNS will be configured.
@ -544,33 +543,33 @@ const (
// PodSpec is a description of a pod
type PodSpec struct {
Volumes []Volume `json:"volumes"`
Containers []Container `json:"containers"`
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
Containers []Container `json:"containers" description:"list of containers belonging to the pod"`
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"`
// Optional: Set DNS policy. Defaults to "ClusterFirst"
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty"`
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
// NodeSelector is a selector which must be true for the pod to fit on a node
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty" description:"selector which must match a node's labels for the pod to be scheduled on that node"`
// Host is a request to schedule this pod onto a specific host. If it is non-empty,
// the the scheduler simply schedules this pod onto that host, assuming that it fits
// other requirements.
// resource requirements.
Host string `json:"host,omitempty" description:"host requested for this pod"`
}
// PodStatus represents information about the status of a pod. Status may trail the actual
// state of a system.
type PodStatus struct {
Phase PodPhase `json:"phase,omitempty"`
Conditions []PodCondition `json:"Condition,omitempty"`
Phase PodPhase `json:"phase,omitempty" description:"current condition of the pod."`
Conditions []PodCondition `json:"Condition,omitempty" description:"current service state of pod"`
// A human readable message indicating details about why the pod is in this state.
Message string `json:"message,omitempty"`
Message string `json:"message,omitempty" description:"human readable message indicating details about why the pod is in this condition"`
// Host is the name of the node that this Pod is currently bound to, or empty if no
// assignment has been done.
Host string `json:"host,omitempty"`
HostIP string `json:"hostIP,omitempty"`
PodIP string `json:"podIP,omitempty"`
Host string `json:"host,omitempty" description:"host to which the pod is assigned; empty if not yet scheduled"`
HostIP string `json:"hostIP,omitempty" description:"IP address of the host to which the pod is assigned; empty if not yet scheduled"`
PodIP string `json:"podIP,omitempty" description:"IP address allocated to the pod; routable at least within the cluster; empty if not yet allocated"`
// The key of this map is the *name* of the container within the manifest; it has one
// entry per container in the manifest. The value of this map is currently the output
@ -578,16 +577,16 @@ type PodStatus struct {
// upon.
// TODO: Make real decisions about what our info should look like. Re-enable fuzz test
// when we have done this.
Info PodInfo `json:"info,omitempty"`
Info PodInfo `json:"info,omitempty" description:"map of container name to container status"`
}
// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
type PodStatusResult struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
// Status represents the current information about a pod. This data may not be up
// to date.
Status PodStatus `json:"status,omitempty"`
Status PodStatus `json:"status,omitempty" description:"most recently observed status of the pod; populated by the system, read-only; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
}
// Pod is a collection of containers that can run on a host. This resource is created
@ -595,48 +594,48 @@ type PodStatusResult struct {
// to hosts.
type Pod struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
// Spec defines the behavior of a pod.
Spec PodSpec `json:"spec,omitempty"`
Spec PodSpec `json:"spec,omitempty" description:"specification of the desired behavior of the pod; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
// Status represents the current information about a pod. This data may not be up
// to date.
Status PodStatus `json:"status,omitempty"`
Status PodStatus `json:"status,omitempty" description:"most recently observed status of the pod; populated by the system, read-only; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
}
// PodList is a list of Pods.
type PodList struct {
TypeMeta `json:",inline"`
ListMeta `json:"metadata,omitempty"`
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#types-kinds`
Items []Pod `json:"items"`
Items []Pod `json:"items" description:"list of pods"`
}
// PodTemplateSpec describes the data a pod should have when created from a template
type PodTemplateSpec struct {
// Metadata of the pods created from this template.
ObjectMeta `json:"metadata,omitempty"`
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
// Spec defines the behavior of a pod.
Spec PodSpec `json:"spec,omitempty"`
Spec PodSpec `json:"spec,omitempty" description:"specification of the desired behavior of the pod; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
}
// PodTemplate describes a template for creating copies of a predefined pod.
type PodTemplate struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
// Spec defines the behavior of a pod.
Spec PodTemplateSpec `json:"spec,omitempty"`
Spec PodTemplateSpec `json:"spec,omitempty" description:"specification of the desired behavior of the pod; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
}
// PodTemplateList is a list of PodTemplates.
type PodTemplateList struct {
TypeMeta `json:",inline"`
ListMeta `json:"metadata,omitempty"`
ListMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
Items []PodTemplate `json:"items"`
Items []PodTemplate `json:"items" description:"list of pod templates"`
}
// BoundPod is a collection of containers that should be run on a host. A BoundPod
@ -644,10 +643,10 @@ type PodTemplateList struct {
// execute a pod, whereas a BoundPod is the specification that would be run on a server.
type BoundPod struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
// Spec defines the behavior of a pod.
Spec PodSpec `json:"spec,omitempty"`
Spec PodSpec `json:"spec,omitempty" description:"specification of the desired behavior of the pod; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
}
// BoundPods is a list of Pods bound to a common server. The resource version of
@ -738,7 +737,7 @@ type ServiceSpec struct {
// PortalIP is usually assigned by the master. If specified by the user
// we will try to respect it or else fail the request. This field can
// not be changed by updates.
PortalIP string `json:"portalIP,omitempty"`
PortalIP string `json:"portalIP,omitempty description: IP address of the service; usually assigned by the system; if specified, it will be allocated to the service if unused, and creation of the service will fail otherwise"`
// CreateExternalLoadBalancer indicates whether a load balancer should be created for this service.
CreateExternalLoadBalancer bool `json:"createExternalLoadBalancer,omitempty"`