k8s

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPCache

type IPCache struct {
	// contains filtered or unexported fields
}

func NewIPCache

func NewIPCache(k8sCli *kubernetes.Clientset) *IPCache

func (*IPCache) BuildClusterIPCache

func (c *IPCache) BuildClusterIPCache() error

func (*IPCache) ClearCache

func (c *IPCache) ClearCache()

func (*IPCache) GetIPType

func (c *IPCache) GetIPType(ip string) (model.EndpointType, error)

func (*IPCache) GetNodeFromIP

func (c *IPCache) GetNodeFromIP(ip string) (*v1.Node, error)

func (*IPCache) GetNodeFromName

func (c *IPCache) GetNodeFromName(name string) (*v1.Node, error)

func (*IPCache) GetNodes

func (c *IPCache) GetNodes() ([]*v1.Node, error)

func (*IPCache) GetPodFromIP

func (c *IPCache) GetPodFromIP(ip string) (*v1.Pod, error)

func (*IPCache) GetPodFromName

func (c *IPCache) GetPodFromName(namespace, name string) (*v1.Pod, error)

func (*IPCache) GetServiceFromIP

func (c *IPCache) GetServiceFromIP(ip string) (*v1.Service, error)

func (*IPCache) GetServiceFromNodePort

func (c *IPCache) GetServiceFromNodePort(nodePort uint16, protocol model.Protocol) (*v1.Service, error)

type NodeInfo

type NodeInfo struct {
	netstack.NetNS
	SubNetNSInfo []netstack.NetNSInfo
	NodeMeta
}

type NodeMeta

type NodeMeta struct {
	NodeName string
}

type NodeNetworkStackDump

type NodeNetworkStackDump struct {
	Pods  []PodNetInfo         `json:"p"`
	Netns []netstack.NetNSInfo `json:"n"`
}

type Pod

type Pod struct {
	model.NetNode
	netstack.NetNS
	PodMeta
}

type PodMeta

type PodMeta struct {
	Namespace   string
	PodName     string
	NodeName    string
	HostNetwork bool
}

type PodNetInfo

type PodNetInfo struct {
	ContainerID  string `json:"id"`
	PodName      string `json:"n"`
	PodNamespace string `json:"ns"`
	PodUID       string `json:"u"`
	PID          uint32 `json:"pid"`
	Netns        string `json:"net"`
	HostNetwork  bool   `json:"hn"`
	NetworkMode  string `json:"nm"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL