# Packages
Package errors provides detailed error types for api field validation.
Package latest defines the default output serializations that code should use and imports the required schemas.
Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API.
No description provided by the author
Package rest defines common logic around changes to Kubernetes resources.
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
No description provided by the author
Package v1beta1 is the v1beta1 version of the API.
Package v1beta2 is the v1beta2 version of the API.
Package v1beta3 is the v1beta3 version of the API.
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
# Functions
FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta.
GenerateName will resolve the object name of the provided ObjectMeta to a generated version if necessary.
GetPartialReference is exactly like GetReference, but allows you to set the FieldPath.
GetReference returns an ObjectReference which refers to the given object, or an error if the object doesn't follow the conventions that would allow this.
HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.
IsEmpty returns true if there are no contexts registered, or an error if it could not be determined.
No description provided by the author
NamespaceFrom returns the value of the namespace key on the ctx.
NamespaceValue returns the value of the namespace key on the ctx, or the empty string if none.
NewContext instantiates a base context object for request flows.
NewDefaultContext instantiates a base context object for request flows in the default namespace.
NewRequestContextFilter ensures there is a Context object associated with the request before calling the passed handler.
NewRequestContextMapper returns a new RequestContextMapper.
GetObjectMetaPtr returns a pointer to a provided object's ObjectMeta.
UserFrom returns the value of the user key on the ctx.
ValidNamespace returns false if the namespace on the context differs from the resource.
WithNamespace returns a copy of parent in which the namespace value is set.
WithNamespaceDefaultIfNone returns a context whose namespace is the default if and only if the parent context has no namespace value.
WithUser returns a copy of parent in which the user value is set.
WithValue returns a copy of parent in which the value associated with key is val.
# Constants
AffinityTypeClientIP is the Client IP based.
AffinityTypeNone - no session affinity.
CauseTypeFieldValueDuplicate is used to report collisions of values that must be unique (e.g.
CauseTypeFieldValueInvalid is used to report malformed values (e.g.
CauseTypeFieldValueNotFound is used to report failure to find a requested value (e.g.
CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules) values that can not be handled (e.g.
CauseTypeFieldValueRequired is used to report required values that are not provided (e.g.
These are valid condition statuses.
These are valid condition statuses.
These are valid condition statuses.
DNSClusterFirst 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.
DNSDefault indicates that the pod should use the default (as determined by kubelet) DNS settings.
Limit that applies to all containers in a namespace.
Limit that applies to all pods in a namespace.
NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces.
NamespaceDefault means the object is in the default namespace which is applied when not specified by clients.
NamespaceNone is the argument for a context when there is no namespace.
NodePending means the node has been created/added by the system, but not configured.
NodeReachable means the node can be reached (in the sense of HTTP connection) from node controller.
NodeReady means the node returns StatusOK for HTTP health check.
NodeRunning means the node has been configured and has Kubernetes components running.
NodeTerminated means the node has been removed from the cluster.
PodFailed means that all containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system).
PodPending means the pod has been accepted by the system, but one or more of the containers has not been started.
PodReady means the pod is able to service requests and should be added to the load balancing pools of all matching services.
PodRunning means the pod has been bound to a node and all of the containers have been started.
PodSucceeded means that all containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers.
PodUnknown means that for some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.
ProtocolTCP is the TCP protocol.
ProtocolUDP is the UDP protocol.
PullAlways means that kubelet always attempts to pull the latest image.
PullIfNotPresent means that kubelet pulls if the image isn't present on disk.
PullNever means that kubelet never pulls an image, but only uses a local image.
CPU, in cores.
Memory, in bytes.
Pods, number.
ResourceQuotas, number.
ReplicationControllers, number.
Services, number.
Values of Status.Status.
StatusReasonAlreadyExists means the resource you are creating already exists.
StatusReasonBadRequest means that the request itself was invalid, because the request doesn't make any sense, for example deleting a read-only object.
StatusReasonConflict means the requested update operation cannot be completed due to a conflict in the operation.
StatusReasonForbidden means the server can be reached and understood the request, but refuses to take any further action.
StatusReasonInternalError indicates that an internal error occurred, it is unexpected and the outcome of the call is unknown.
StatusReasonInvalid means the requested create or update operation cannot be completed due to invalid data provided as part of the request.
StatusReasonMethodNotAllowed means that the action the client attempted to perform on the resource was not supported by the code - for instance, attempting to delete a resource that can only be created.
StatusReasonNotFound means one or more resources required for this operation could not be found.
StatusReasonServerTimeout means the server can be reached and understood the request, but cannot complete the action in a reasonable time.
StatusReasonTimeout means that the request could not be completed within the given time.
StatusReasonUnknown means the server has declined to indicate a specific reason.
Values of Status.Status.
TerminationMessagePathDefault means the default path to capture the application termination message running in a container.
# Variables
Codec is the identity codec for this package - it can only convert itself to itself.
Errors that could be returned by GetReference.
No description provided by the author
ForTesting_ReferencesAllowBlankSelfLinks can be set to true in tests to avoid "ErrNoSelfLink" errors.
Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
Semantic can do semantic deep equality checks for api objects.
SimpleNameGenerator is a generator that returns the name plus a random suffix of five alphanumerics when a name is requested.
# Structs
APIVersions lists the api versions that are available, to allow version negotiation.
Binding is written by a scheduler to cause a pod to be bound to a host.
BoundPod is a collection of containers that should be run on a host.
BoundPods is a list of Pods bound to a common server.
Capabilities represent POSIX capabilities that can be added or removed to a running container.
Container represents a single container that is expected to be run on the host.
ContainerManifest corresponds to the Container Manifest format, documented at: https://developers.google.com/compute/docs/containers/container_vms#container_manifest This is used as the representation of Kubernetes workloads.
ContainerManifestList is used to communicate container manifests to kubelet.
ContainerState holds a possible state of container.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Conversion error conveniently packages up errors in conversions.
No description provided by the author
Endpoints is a collection of endpoints that implement the actual service, for example: Name: "mysql", Endpoints: ["10.10.1.1:1909", "10.10.2.2:8834"].
EndpointsList is a list of endpoints.
EnvVar represents an environment variable present in a Container.
Event is a report of an event somewhere in the cluster.
EventList is a list of events.
No description provided by the author
ExecAction describes a "run in container" action.
GCEPersistentDisk represents a Persistent Disk resource in Google Compute Engine.
GitRepo represents a volume that is pulled from git when the pod is created.
Handler defines a specific action that should be taken TODO: pass structured data to these actions, and document that data here.
HostPath represents bare host directory volume.
HTTPGetAction describes an action based on HTTP Get requests.
Lifecycle describes actions that the management system should take in response to container lifecycle events.
LimitRange sets resource usage limits for each kind of resource in a Namespace.
LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
LimitRangeList is a list of LimitRange items.
LimitRangeSpec defines a min/max usage limit for resources that match on kind.
List holds a list of objects, which may not be known by the server.
ListMeta describes metadata that synthetic resources must have, including lists and various status objects.
A namespace provides a scope for Names.
NamespaceList is a list of Namespaces.
NamespaceSpec describes the attributes on a Namespace.
NamespaceStatus is information about the current status of a Namespace.
Node is a worker node in Kubernetenes The name of the node according to etcd is in ObjectMeta.Name.
No description provided by the author
NodeList is a list of minions.
NodeResources is an object for conveying resource information about a node.
NodeSpec describes the attributes that a node is created with.
NodeStatus is information about the current status of a node.
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
ObjectReference contains enough information to let you inspect or modify the referred object.
Pod is a collection of containers, used as either input (create, update) or as output (list, get).
TODO: add LastTransitionTime, Reason, Message to match NodeCondition api.
PodContainerInfo is a wrapper for PodInfo that can be encode/decoded DEPRECATED: Replaced with PodStatusResult.
PodList is a list of Pods.
PodSpec is a description of a pod.
PodStatus represents information about the status of a pod.
PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded.
PodTemplate describes a template for creating copies of a predefined pod.
PodTemplateList is a list of PodTemplates.
PodTemplateSpec describes the data a pod should have when created from a template.
Port represents a network port in a single container.
Probe describes a liveness probe to be examined to the container.
ReplicationController represents the configuration of a replication controller.
ReplicationControllerList is a collection of replication controllers.
ReplicationControllerSpec is the specification of a replication controller.
ReplicationControllerStatus represents the current status of a replication controller.
ResourceQuota sets aggregate quota restrictions enforced per namespace.
ResourceQuotaList is a list of ResourceQuota items.
ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
ResourceQuotaStatus defines the enforced hard limits and observed use.
ResourceQuotaUsage captures system observed quota status per namespace It is used to enforce atomic updates of a backing ResourceQuota.Status field in storage.
ResourceRequirements describes the compute resource requirements.
RestartPolicy describes how the container should be restarted.
No description provided by the author
No description provided by the author
TODO(dchen1107): Define what kinds of failures should restart.
RootPaths lists the paths available at root.
Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
ServiceList holds a list of services.
ServiceSpec describes the attributes that a user creates on a service.
ServiceStatus represents the current status of a service.
Status is a return value for calls that don't return other objects.
StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response.
TCPSocketAction describes an action based on opening a socket.
TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version.
Volume represents a named volume in a pod that may be accessed by any containers in the pod.
VolumeMount describes a mounting of a Volume within a container.
VolumeSource represents the source location of a volume to mount.
# Interfaces
Context carries values across API boundaries.
NameGenerator generates names for objects.
RequestContextMapper keeps track of the context associated with a particular request.
# Type aliases
Session Affinity Type string.
CapabilityType represent POSIX capabilities type.
CauseType is a machine readable value providing more detail about what occured in a status response.
No description provided by the author
DNSPolicy defines how a pod's DNS will be configured.
A type of object that is limited.
No description provided by the author
No description provided by the author
No description provided by the author
PodInfo contains one entry for every container with available info.
PodPhase is a label for the condition of a pod at the current time.
Protocol defines network protocols supported for things like conatiner ports.
PullPolicy describes a policy for if/when to pull a container image.
ResourceList is a set of (resource name, quantity) pairs.
ResourceName is the name identifying various resources in a ResourceList.
StatusReason is an enumeration of possible failure causes.