package
0.21.4
Repository: https://github.com/swghosh/kubernetes.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
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.
TODO: move everything in this file to pkg/api/rest.
Package to keep track of API Versions that should be registered in api.Scheme.
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 v1 is the v1 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

AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, only if they do not already exist.
TODO: remove me when watch is refactored.
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.
No description provided by the author
No description provided by the author
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.
No description provided by the author
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.
IsPodReady retruns true if a pod is ready; false otherwise.
this function aims to check if the service's cluster IP is requested or not.
this function aims to check if the service's ClusterIP is set or not the objective is not to perform validation here.
No description provided by the author
No description provided by the author
TODO: remove me when watch is refactored.
ListMetaFor returns a pointer to a provided object's ListMeta, or an error if the object does not have that pointer.
TODO: make method on LoadBalancerStatus?.
TODO: make method on LoadBalancerStatus?.
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.
NewDeleteOptions returns a DeleteOptions indicating the resource should be deleted within the specified grace period.
NewRequestContextFilter ensures there is a Context object associated with the request before calling the passed handler.
NewRequestContextMapper returns a new RequestContextMapper.
ObjectMetaFor returns a pointer to a provided object's ObjectMeta.
preV1Beta3 returns true if the provided API version is an API introduced before v1beta3.
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

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.
CauseTypeUnexpectedServerResponse is used to report when the server responded to the client without the expected return type.
used for PersistentVolumeClaims that are bound.
used for PersistentVolumeClaims that are not yet bound.
ClusterIPNone - do not assign a cluster IP no proxying required and no environment variables should be created for pods.
These are the valid conditions for the component.
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.
DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets.
Command to run for remote command execution.
Enable stderr for remote command execution.
Enable stdin for remote command execution.
Enable stdout for remote command execution.
Enable TTY for remote command execution.
These are internal finalizer values to Kubernetes, must be qualified name unless defined here.
No description provided by the author
Limit that applies to all containers in a namespace.
Limit that applies to all pods in a namespace.
No description provided by the author
No description provided by the author
NamespaceActive means the namespace is available for use in the system.
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.
NamespaceSystem is the system namespace where we place system components.
NamespaceTerminating means the namespace is undergoing graceful termination.
These are valid address types of node.
These are valid address types of node.
These are valid address types of node.
These are valid address types of node.
NodePending means the node has been created/added by the system, but not configured.
NodeReady means kubelet is healthy and ready to accept pods.
NodeRunning means the node has been configured and has Kubernetes components running.
NodeTerminated means the node has been removed from the cluster.
PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
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.
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
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.
can be mounted in read-only mode to many hosts.
can be mounted in read/write mode to many hosts.
can be mounted read/write mode to exactly 1 host.
CPU, in cores.
Memory, in bytes.
ResourcePersistentVolumeClaims, number.
Pods, number.
ResourceQuotas, number.
ReplicationControllers, number.
ResourceSecrets, number.
Services, number.
Volume size, in bytes (e,g.
No description provided by the author
No description provided by the author
No description provided by the author
SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg Required fields: - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file.
SecretTypeOpaque is the default; arbitrary user-defined data.
SecretTypeServiceAccountToken contains a token that identifies a service account to the API Required fields: - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies - Secret.Data["token"] - a token that identifies the service account to the API.
ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets.
ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets.
ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets.
ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets.
ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets.
ServiceAffinityClientIP is the Client IP based.
ServiceAffinityNone - no session affinity.
ServiceTypeClusterIP means a service will only be accessible inside the cluster, via the ClusterIP.
ServiceTypeLoadBalancer means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type.
ServiceTypeNodePort means a service will be exposed on one port of every node, in addition to 'ClusterIP' type.
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.
StatusReasonUnauthorized means the server can be reached and understood the request, but requires the user to present appropriate authorization credentials (identified by the WWW-Authenticate header) in order for the action to be completed.
StatusReasonUnknown means the server has declined to indicate a specific reason.
Values of Status.Status.
use whatever the default is for the node.
use memory (tmpfs).
No description provided by the author
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
These constants are for remote command execution and port forwarding and are used by both the client side and server side components.
TerminationMessagePathDefault means the default path to capture the application termination message running in a container.
URISchemeHTTP means that the scheme used will be http://.
URISchemeHTTPS means that the scheme used will be https://.
used for PersistentVolumes that are not yet bound Available volumes are held by the binder and matched to PersistentVolumeClaims.
used for PersistentVolumes that are bound.
used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim.
used for PersistentVolumes that are not available.
used for PersistentVolumes where the bound PersistentVolumeClaim was deleted released volumes must be recycled before becoming available again this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource.

# 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.
AWSElasticBlockStoreVolumeSource represents a Persistent Disk resource in AWS.
Binding ties one object to another - for example, a pod is bound to a node by a scheduler.
Capabilities represent POSIX capabilities that can be added or removed to a running container.
No description provided by the author
ComponentStatus (and ComponentStatusList) holds the cluster validation info.
No description provided by the author
Container represents a single container that is expected to be run on the host.
ContainerPort represents a network port in a single container.
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.
DeleteOptions may be provided when deleting an API object.
EmptyDirVolumeSource represents an empty directory for a pod.
EndpointAddress is a tuple that describes single IP address.
EndpointPort is a tuple that describes a single port.
Endpoints is a collection of endpoints that implement the actual service.
EndpointsList is a list of endpoints.
EndpointSubset is a group of addresses with a common set of ports.
EnvVar represents an environment variable present in a Container.
EnvVarSource represents a source for the value of an EnvVar.
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.
GCEPersistentDiskVolumeSource represents a Persistent Disk resource in Google Compute Engine.
GitRepoVolumeSource represents a volume that is pulled from git when the pod is created.
GlusterfsVolumeSource represents a Glusterfs Mount that lasts the lifetime of a pod.
Handler defines a specific action that should be taken TODO: pass structured data to these actions, and document that data here.
HostPathVolumeSource represents a host directory mapped into a pod.
HTTPGetAction describes an action based on HTTP Get requests.
A ISCSI Disk can only be mounted as read/write once.
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.
ListOptions is the query options to a standard REST list call, and has future support for watch calls.
LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.
LoadBalancerStatus represents the status of a load-balancer.
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
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.
NFSVolumeSource represents an NFS Mount that lasts the lifetime of a pod.
Node is a worker node in Kubernetes The name of the node according to etcd is in ObjectMeta.Name.
No description provided by the author
No description provided by the author
NodeList is a list of nodes.
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.
NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
ObjectFieldSelector selects an APIVersioned field of an object.
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.
Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
No description provided by the author
PersistentVolumeClaim is a user's request for and claim to a persistent volume.
No description provided by the author
PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes.
No description provided by the author
No description provided by the author
No description provided by the author
Similar to VolumeSource but meant for the administrator who creates PVs.
No description provided by the author
No description provided by the author
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.
PodExecOptions is the query options to a Pod's remote exec call.
PodList is a list of Pods.
PodLogOptions is the query options for a Pod's logs REST call.
PodProxyOptions is the query options to a Pod's proxy call.
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.
Probe describes a liveness probe to be examined to the container.
RangeAllocation is an opaque API object (not exposed to end users) that can be persisted to record the global allocation state of the cluster.
RBDVolumeSource represents a Rados Block Device Mount that lasts the lifetime of a pod.
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.
ResourceRequirements describes the compute resource requirements.
RootPaths lists the paths available at root.
Secret holds secret data of a certain type.
No description provided by the author
SecretVolumeSource adapts a Secret into a VolumeSource.
SecurityContext holds security configuration that will be applied to a container.
SELinuxOptions are the labels to be applied to the container.
No description provided by the author
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.
ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets.
ServiceAccountList is a list of ServiceAccount objects.
ServiceList holds a list of services.
No description provided by the author
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

Capability represent POSIX capabilities type.
CauseType is a machine readable value providing more detail about what occured in a status response.
Type and constants for component health validation.
No description provided by the author
DNSPolicy defines how a pod's DNS will be configured.
No description provided by the author
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
No description provided by the author
Similarly to above, these are constants to support HTTP PATCH utilized by both the client and server that didn't make sense for a whole package to be dedicated to.
No description provided by the author
No description provided by the author
No description provided by the author
PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes.
No description provided by the author
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.
RestartPolicy describes how the container should be restarted.
No description provided by the author
Session Affinity Type string.
Service Type string describes ingress methods for a service.
StatusReason is an enumeration of possible failure causes.
StorageMedium defines ways that storage can be allocated to a volume.
URIScheme identifies the scheme used for connection to a host for Get actions.