Documentation ¶
Index ¶
Constants ¶
const ( // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces NamespaceAll string = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { // Required: This must be a DNS_LABEL. Each container in a pod must // have a unique name. Name string `json:"name" description:"name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated"` // Optional. Image string `json:"image,omitempty" description:"Docker image name; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"` }
Container represents a single container that is expected to be run on the host.
type Discovery ¶
type Discovery struct { Conf *config.KubernetesSDConfig // contains filtered or unexported fields }
Discovery implements a TargetProvider for Kubernetes services.
func (*Discovery) Initialize ¶
Initialize sets up the discovery for usage.
func (*Discovery) Run ¶
func (kd *Discovery) Run(ch chan<- *config.TargetGroup, done <-chan struct{})
Run implements the TargetProvider interface.
type EndpointAddress ¶
type EndpointAddress struct { // The IP of this endpoint. // TODO: This should allow hostname or IP, see #4447. IP string `json:"ip" description:"IP address of the endpoint"` }
EndpointAddress is a tuple that describes single IP address.
type EndpointPort ¶
type EndpointPort struct { // The port number. Port int `json:"port" description:"port number of the endpoint"` // The IP protocol for this port. Protocol Protocol `json:"protocol,omitempty" description:"protocol for this port; must be UDP or TCP; TCP if unspecified"` }
EndpointPort is a tuple that describes a single port.
type EndpointSubset ¶
type EndpointSubset struct { Addresses []EndpointAddress `json:"addresses,omitempty" description:"IP addresses which offer the related ports"` Ports []EndpointPort `json:"ports,omitempty" description:"port numbers available on the related IP addresses"` }
EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:
{ Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }
The resulting set of endpoints can be viewed as:
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]
type Endpoints ¶
type Endpoints struct { ObjectMeta `` /* 136-byte string literal not displayed */ // The set of all endpoints is the union of all subsets. Subsets []EndpointSubset `json:"subsets" description:"sets of addresses and ports that comprise a service"` }
Endpoints is a collection of endpoints that implement the actual service. Example:
Name: "mysvc", Subsets: [ { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }, { Addresses: [{"ip": "10.10.3.3"}], Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] }, ]
type EndpointsList ¶
type EndpointsList struct { ListMeta `` /* 134-byte string literal not displayed */ Items []Endpoints `json:"items" description:"list of endpoints"` }
EndpointsList is a list of endpoints.
type ListMeta ¶
type ListMeta struct { // 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 // and values may only be valid for a particular resource or set of resources. Only servers // will generate resource versions. ResourceVersion string `` /* 388-byte string literal not displayed */ }
ListMeta describes metadata that synthetic resources must have, including lists and various status objects.
type Node ¶
type Node struct { ObjectMeta `` /* 136-byte string literal not displayed */ // Status describes the current status of a Node Status NodeStatus `` /* 190-byte string literal not displayed */ }
Node is a worker node in Kubernetes, formerly known as minion. Each node will have a unique identifier in the cache (i.e. in etcd).
type NodeAddress ¶
type NodeAddress struct { Type NodeAddressType `json:"type" description:"node address type, one of Hostname, ExternalIP or InternalIP"` Address string `json:"address" description:"the node address"` }
type NodeAddressType ¶
type NodeAddressType string
const ( NodeHostName NodeAddressType = "Hostname" NodeExternalIP NodeAddressType = "ExternalIP" NodeInternalIP NodeAddressType = "InternalIP" )
These are valid address type of node.
type NodeList ¶
type NodeList struct { ListMeta `` /* 134-byte string literal not displayed */ Items []Node `json:"items" description:"list of nodes"` }
NodeList is the whole list of all Nodes which have been registered with master.
type NodeStatus ¶
type NodeStatus struct { // Queried from cloud provider, if available. Addresses []NodeAddress `` /* 190-byte string literal not displayed */ }
NodeStatus is information about the current status of a node.
type ObjectMeta ¶
type ObjectMeta struct { // Name is unique within a namespace. Name is required when creating resources, although // 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 `` /* 192-byte string literal not displayed */ // Namespace defines the space within which name must be unique. An empty namespace is // 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 `` /* 167-byte string literal not displayed */ ResourceVersion string `` /* 388-byte string literal not displayed */ // TODO: replace map[string]string with labels.LabelSet type Labels map[string]string `` /* 239-byte string literal not displayed */ // 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 `` /* 228-byte string literal not displayed */ }
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
type Protocol ¶
type Protocol string
Protocol defines network protocols supported for things like conatiner ports.
type Service ¶
type Service struct {
ObjectMeta `` /* 136-byte string literal not displayed */
}
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.
type ServiceList ¶
type ServiceList struct { ListMeta `` /* 134-byte string literal not displayed */ Items []Service `json:"items" description:"list of services"` }
ServiceList holds a list of services.