node

package
Version: v3.3.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 24

Documentation

Index

Constants

View Source
const (
	// NodeKeyword defines the keyword identifying Node data.
	NodeKeyword = "node"
)

Variables

View Source
var NodeAddress_AddressType_name = map[int32]string{
	0: "NodeUnknownAddr",
	1: "NodeHostName",
	2: "NodeExternalIP",
	3: "NodeInternalIP",
	4: "NodeExternalDNS",
	5: "NodeInternalDNS",
}
View Source
var NodeAddress_AddressType_value = map[string]int32{
	"NodeUnknownAddr": 0,
	"NodeHostName":    1,
	"NodeExternalIP":  2,
	"NodeInternalIP":  3,
	"NodeExternalDNS": 4,
	"NodeInternalDNS": 5,
}

Functions

func Key

func Key(node string) string

Key returns the key under which a configuration for the given node should be stored in the data-store.

func KeyPrefix

func KeyPrefix() string

KeyPrefix returns the key prefix used in the data-store to save the current state of every known K8s node.

func ParseNodeFromKey

func ParseNodeFromKey(key string) (node string, err error)

ParseNodeFromKey parses namespace id from the associated data-store key.

Types

type ID

type ID string

ID used to uniquely represent a K8s Node.

func GetID

func GetID(node *Node) ID

GetID returns ID of a node.

func (ID) String

func (id ID) String() string

String returns a string representation of a node ID.

type Node

type Node struct {
	// Name of the node unique within the cluster.
	// Cannot be updated.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// PodCIDR represents the pod IP range assigned to the node.
	// +optional
	Pod_CIDR string `protobuf:"bytes,2,opt,name=pod_CIDR,json=podCIDR,proto3" json:"pod_CIDR,omitempty"`
	// ID of the node assigned by the cloud provider in the format:
	// <ProviderName>://<ProviderSpecificNodeID>
	// +optional
	Provider_ID string `protobuf:"bytes,3,opt,name=provider_ID,json=providerID,proto3" json:"provider_ID,omitempty"`
	// List of addresses reachable to the node.
	// Queried from cloud provider, if available.
	// More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
	// +optional
	Addresses []*NodeAddress `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// Set of ids/uuids to uniquely identify the node.
	// More info: https://kubernetes.io/docs/concepts/nodes/node/#info
	// +optional
	NodeInfo             *NodeSystemInfo `protobuf:"bytes,5,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.

func (*Node) Descriptor

func (*Node) Descriptor() ([]byte, []int)

func (*Node) GetAddresses

func (m *Node) GetAddresses() []*NodeAddress

func (*Node) GetName

func (m *Node) GetName() string

func (*Node) GetNodeInfo

func (m *Node) GetNodeInfo() *NodeSystemInfo

func (*Node) GetPod_CIDR

func (m *Node) GetPod_CIDR() string

func (*Node) GetProvider_ID

func (m *Node) GetProvider_ID() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

func (*Node) XXX_DiscardUnknown added in v1.4.0

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal added in v1.4.0

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge added in v1.4.0

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size added in v1.4.0

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal added in v1.4.0

func (m *Node) XXX_Unmarshal(b []byte) error

type NodeAddress

type NodeAddress struct {
	// Node address type, one of Hostname, ExternalIP or InternalIP.
	Type NodeAddress_AddressType `protobuf:"varint,1,opt,name=type,proto3,enum=node.NodeAddress_AddressType" json:"type,omitempty"`
	// The node address.
	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NodeAddress contains information for the node's address.

func (*NodeAddress) Descriptor

func (*NodeAddress) Descriptor() ([]byte, []int)

func (*NodeAddress) GetAddress

func (m *NodeAddress) GetAddress() string

func (*NodeAddress) GetType

func (m *NodeAddress) GetType() NodeAddress_AddressType

func (*NodeAddress) ProtoMessage

func (*NodeAddress) ProtoMessage()

func (*NodeAddress) Reset

func (m *NodeAddress) Reset()

func (*NodeAddress) String

func (m *NodeAddress) String() string

func (*NodeAddress) XXX_DiscardUnknown added in v1.4.0

func (m *NodeAddress) XXX_DiscardUnknown()

func (*NodeAddress) XXX_Marshal added in v1.4.0

func (m *NodeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeAddress) XXX_Merge added in v1.4.0

func (m *NodeAddress) XXX_Merge(src proto.Message)

func (*NodeAddress) XXX_Size added in v1.4.0

func (m *NodeAddress) XXX_Size() int

func (*NodeAddress) XXX_Unmarshal added in v1.4.0

func (m *NodeAddress) XXX_Unmarshal(b []byte) error

type NodeAddress_AddressType

type NodeAddress_AddressType int32

These are valid address type of node.

const (
	NodeAddress_NodeUnknownAddr NodeAddress_AddressType = 0
	NodeAddress_NodeHostName    NodeAddress_AddressType = 1
	NodeAddress_NodeExternalIP  NodeAddress_AddressType = 2
	NodeAddress_NodeInternalIP  NodeAddress_AddressType = 3
	NodeAddress_NodeExternalDNS NodeAddress_AddressType = 4
	NodeAddress_NodeInternalDNS NodeAddress_AddressType = 5
)

func (NodeAddress_AddressType) EnumDescriptor

func (NodeAddress_AddressType) EnumDescriptor() ([]byte, []int)

func (NodeAddress_AddressType) String

func (x NodeAddress_AddressType) String() string

type NodeSystemInfo

type NodeSystemInfo struct {
	// MachineID reported by the node. For unique machine identification
	// in the cluster this field is preferred. Learn more from man(5)
	// machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
	Machine_ID string `protobuf:"bytes,1,opt,name=machine_ID,json=machineID,proto3" json:"machine_ID,omitempty"`
	// SystemUUID reported by the node. For unique machine identification
	// MachineID is preferred. This field is specific to Red Hat hosts
	// https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
	System_UUID string `protobuf:"bytes,2,opt,name=system_UUID,json=systemUUID,proto3" json:"system_UUID,omitempty"`
	// Boot ID reported by the node.
	Boot_ID string `protobuf:"bytes,3,opt,name=boot_ID,json=bootID,proto3" json:"boot_ID,omitempty"`
	// Kernel Version reported by the node from 'uname -r'
	// (e.g. 3.16.0-0.bpo.4-amd64).
	KernelVersion string `protobuf:"bytes,4,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"`
	// OS Image reported by the node from /etc/os-release
	// (e.g. Debian GNU/Linux 7 (wheezy)).
	OsImage string `protobuf:"bytes,5,opt,name=os_image,json=osImage,proto3" json:"os_image,omitempty"`
	// ContainerRuntime Version reported by the node through runtime remote API
	// (e.g. docker://1.5.0).
	ContainerRuntimeVersion string `` /* 132-byte string literal not displayed */
	// Kubelet Version reported by the node.
	KubeletVersion string `protobuf:"bytes,7,opt,name=kubelet_version,json=kubeletVersion,proto3" json:"kubelet_version,omitempty"`
	// KubeProxy Version reported by the node.
	KubeProxyVersion string `protobuf:"bytes,8,opt,name=KubeProxyVersion,proto3" json:"KubeProxyVersion,omitempty"`
	OperatingSystem  string `protobuf:"bytes,9,opt,name=OperatingSystem,proto3" json:"OperatingSystem,omitempty"`
	// The Architecture reported by the node
	Architecture         string   `protobuf:"bytes,10,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NodeSystemInfo is a set of ids/uuids to uniquely identify the node.

func (*NodeSystemInfo) Descriptor

func (*NodeSystemInfo) Descriptor() ([]byte, []int)

func (*NodeSystemInfo) GetArchitecture

func (m *NodeSystemInfo) GetArchitecture() string

func (*NodeSystemInfo) GetBoot_ID

func (m *NodeSystemInfo) GetBoot_ID() string

func (*NodeSystemInfo) GetContainerRuntimeVersion

func (m *NodeSystemInfo) GetContainerRuntimeVersion() string

func (*NodeSystemInfo) GetKernelVersion

func (m *NodeSystemInfo) GetKernelVersion() string

func (*NodeSystemInfo) GetKubeProxyVersion

func (m *NodeSystemInfo) GetKubeProxyVersion() string

func (*NodeSystemInfo) GetKubeletVersion

func (m *NodeSystemInfo) GetKubeletVersion() string

func (*NodeSystemInfo) GetMachine_ID

func (m *NodeSystemInfo) GetMachine_ID() string

func (*NodeSystemInfo) GetOperatingSystem

func (m *NodeSystemInfo) GetOperatingSystem() string

func (*NodeSystemInfo) GetOsImage

func (m *NodeSystemInfo) GetOsImage() string

func (*NodeSystemInfo) GetSystem_UUID

func (m *NodeSystemInfo) GetSystem_UUID() string

func (*NodeSystemInfo) ProtoMessage

func (*NodeSystemInfo) ProtoMessage()

func (*NodeSystemInfo) Reset

func (m *NodeSystemInfo) Reset()

func (*NodeSystemInfo) String

func (m *NodeSystemInfo) String() string

func (*NodeSystemInfo) XXX_DiscardUnknown added in v1.4.0

func (m *NodeSystemInfo) XXX_DiscardUnknown()

func (*NodeSystemInfo) XXX_Marshal added in v1.4.0

func (m *NodeSystemInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeSystemInfo) XXX_Merge added in v1.4.0

func (m *NodeSystemInfo) XXX_Merge(src proto.Message)

func (*NodeSystemInfo) XXX_Size added in v1.4.0

func (m *NodeSystemInfo) XXX_Size() int

func (*NodeSystemInfo) XXX_Unmarshal added in v1.4.0

func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL