Documentation ¶
Overview ¶
Package pod is a generated protocol buffer package.
Package pod defines data model for Kubernetes Pod.
It is generated from these files:
pod.proto
It has these top-level messages:
Pod
Index ¶
- Constants
- Variables
- func Key(name string, namespace string) string
- func KeyPrefix() string
- func ParsePodFromKey(key string) (pod string, namespace string, err error)
- type ID
- type Pod
- func (*Pod) Descriptor() ([]byte, []int)
- func (m *Pod) GetContainer() []*Pod_Container
- func (m *Pod) GetHostIpAddress() string
- func (m *Pod) GetIpAddress() string
- func (m *Pod) GetLabel() []*Pod_Label
- func (m *Pod) GetName() string
- func (m *Pod) GetNamespace() string
- func (*Pod) ProtoMessage()
- func (m *Pod) Reset()
- func (m *Pod) String() string
- type Pod_Container
- type Pod_Container_Port
- func (*Pod_Container_Port) Descriptor() ([]byte, []int)
- func (m *Pod_Container_Port) GetContainerPort() int32
- func (m *Pod_Container_Port) GetHostIpAddress() string
- func (m *Pod_Container_Port) GetHostPort() int32
- func (m *Pod_Container_Port) GetName() string
- func (m *Pod_Container_Port) GetProtocol() Pod_Container_Port_Protocol
- func (*Pod_Container_Port) ProtoMessage()
- func (m *Pod_Container_Port) Reset()
- func (m *Pod_Container_Port) String() string
- type Pod_Container_Port_Protocol
- type Pod_Label
Constants ¶
View Source
const (
// PodKeyword defines the keyword identifying Pod data.
PodKeyword = "pod"
)
Variables ¶
View Source
var Pod_Container_Port_Protocol_name = map[int32]string{
0: "TCP",
1: "UDP",
}
View Source
var Pod_Container_Port_Protocol_value = map[string]int32{
"TCP": 0,
"UDP": 1,
}
Functions ¶
Types ¶
type Pod ¶
type Pod struct { // Name of the pod unique within the namespace. // Cannot be updated. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Namespace the pod is inserted into. // An empty namespace is equivalent to the "default" namespace, but "default" // is the canonical representation. // Cannot be updated. Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` // A list of labels attached to this pod. // +optional Label []*Pod_Label `protobuf:"bytes,3,rep,name=label" json:"label,omitempty"` // IP address allocated to the pod. Routable at least within the cluster. // Empty if not yet allocated. // +optional IpAddress string `protobuf:"bytes,4,opt,name=ip_address,json=ipAddress" json:"ip_address,omitempty"` // IP address of the host to which the pod is assigned. // Empty if not yet scheduled. // +optional HostIpAddress string `protobuf:"bytes,5,opt,name=host_ip_address,json=hostIpAddress" json:"host_ip_address,omitempty"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. // There must be at least one container in a Pod. // Cannot be updated. Container []*Pod_Container `protobuf:"bytes,6,rep,name=container" json:"container,omitempty"` }
Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.
func (*Pod) Descriptor ¶
func (*Pod) GetContainer ¶
func (m *Pod) GetContainer() []*Pod_Container
func (*Pod) GetHostIpAddress ¶
func (*Pod) GetIpAddress ¶
func (*Pod) GetNamespace ¶
func (*Pod) ProtoMessage ¶
func (*Pod) ProtoMessage()
type Pod_Container ¶
type Pod_Container struct { // Name of the container. // Each container in a pod has a unique name. // Cannot be updated. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // List of ports to expose from the container. Exposing a port here gives // the system additional information about the network connections a // container uses, but it is primarily informational. Not specifying a port // here DOES NOT prevent that port from being exposed. Any port which is // listening on the default "0.0.0.0" address inside a container will be // accessible from the network. // Cannot be updated. // +optional Port []*Pod_Container_Port `protobuf:"bytes,2,rep,name=port" json:"port,omitempty"` }
A single application container run within a pod.
func (*Pod_Container) Descriptor ¶
func (*Pod_Container) Descriptor() ([]byte, []int)
func (*Pod_Container) GetName ¶
func (m *Pod_Container) GetName() string
func (*Pod_Container) GetPort ¶
func (m *Pod_Container) GetPort() []*Pod_Container_Port
func (*Pod_Container) ProtoMessage ¶
func (*Pod_Container) ProtoMessage()
func (*Pod_Container) Reset ¶
func (m *Pod_Container) Reset()
func (*Pod_Container) String ¶
func (m *Pod_Container) String() string
type Pod_Container_Port ¶
type Pod_Container_Port struct { // An IANA_SVC_NAME formatted port name, unique within the pod. // The name can be referred to by services, policies, ... // +optional Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Port number to expose on the host. // The port number is in the range: 0 < x < 65536. // If pod is in the host network namespace, this must match container_port. // Most containers do not need this. // +optional HostPort int32 `protobuf:"varint,2,opt,name=host_port,json=hostPort" json:"host_port,omitempty"` // Port number to expose on the pod's IP address. // The port number is in the range: 0 < x < 65536. ContainerPort int32 `protobuf:"varint,3,opt,name=container_port,json=containerPort" json:"container_port,omitempty"` // Protocol for port. Must be UDP or TCP. // Defaults to "TCP". // +optional Protocol Pod_Container_Port_Protocol `protobuf:"varint,4,opt,name=protocol,enum=pod.Pod_Container_Port_Protocol" json:"protocol,omitempty"` // What host IP to bind the external port to. // +optional HostIpAddress string `protobuf:"bytes,5,opt,name=host_ip_address,json=hostIpAddress" json:"host_ip_address,omitempty"` }
Port represents a network port in a single container.
func (*Pod_Container_Port) Descriptor ¶
func (*Pod_Container_Port) Descriptor() ([]byte, []int)
func (*Pod_Container_Port) GetContainerPort ¶
func (m *Pod_Container_Port) GetContainerPort() int32
func (*Pod_Container_Port) GetHostIpAddress ¶
func (m *Pod_Container_Port) GetHostIpAddress() string
func (*Pod_Container_Port) GetHostPort ¶
func (m *Pod_Container_Port) GetHostPort() int32
func (*Pod_Container_Port) GetName ¶
func (m *Pod_Container_Port) GetName() string
func (*Pod_Container_Port) GetProtocol ¶
func (m *Pod_Container_Port) GetProtocol() Pod_Container_Port_Protocol
func (*Pod_Container_Port) ProtoMessage ¶
func (*Pod_Container_Port) ProtoMessage()
func (*Pod_Container_Port) Reset ¶
func (m *Pod_Container_Port) Reset()
func (*Pod_Container_Port) String ¶
func (m *Pod_Container_Port) String() string
type Pod_Container_Port_Protocol ¶
type Pod_Container_Port_Protocol int32
Protocol defines network protocols supported for container ports.
const ( Pod_Container_Port_TCP Pod_Container_Port_Protocol = 0 Pod_Container_Port_UDP Pod_Container_Port_Protocol = 1 )
func (Pod_Container_Port_Protocol) EnumDescriptor ¶
func (Pod_Container_Port_Protocol) EnumDescriptor() ([]byte, []int)
func (Pod_Container_Port_Protocol) String ¶
func (x Pod_Container_Port_Protocol) String() string
type Pod_Label ¶
type Pod_Label struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` }
Label is a key/value pair attached to an object (pod in this case). Labels are used to organize and to select subsets of objects.
func (*Pod_Label) Descriptor ¶
func (*Pod_Label) ProtoMessage ¶
func (*Pod_Label) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.