k8sapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterNodes

func FilterNodes(nodes []v1.Node, test func(v1.Node) bool) (ret []v1.Node)

Operations on v1.Node objects

func GetNodesIpToName

func GetNodesIpToName(nodes []v1.Node) map[string]string

func GetNodesNameToIp

func GetNodesNameToIp(nodes []v1.Node) map[string]string
Retrieves node names and ips given a list of nodes

return map of node name to node ip

func MapNodeNames

func MapNodeNames(nodes []string, f func(string) v1.Node) (ret []v1.Node)

func MapNodes

func MapNodes(nodes []v1.Node, f func(v1.Node) string) (ret []string)

func RetrieveInternalIP

func RetrieveInternalIP(node v1.Node) string

func WindowsOS

func WindowsOS(node v1.Node) bool

Types

type K8sapi

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

K8sapi is used to request data from the Kubernetes API-Server

func New

func New(config string) K8sapi

Constructor for K8sapi

func (*K8sapi) GetAllNodesWindows

func (k8sclient *K8sapi) GetAllNodesWindows() *v1.NodeList

func (*K8sapi) GetNamespace

func (k8sclient *K8sapi) GetNamespace(namespace string) *v1.Namespace

func (*K8sapi) GetNode

func (k8sclient *K8sapi) GetNode(nodeName string) *v1.Node

func (*K8sapi) GetPod

func (k8sclient *K8sapi) GetPod(podName string, kubenamespace string) *v1.Pod

Jump to

Keyboard shortcuts

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