k8s

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentNamespace added in v0.0.2

func CurrentNamespace(configFlags *genericclioptions.ConfigFlags) (string, error)

CurrentNamespace get the namespace in use

func FindServiceUsingPort added in v0.0.2

func FindServiceUsingPort(restConfig *rest.Config, namespace string, port int) (string, error)

FindServiceUsingPort tries to find a service using a specific port

Types

type ClusterInfo

type ClusterInfo struct {
	Pods map[string]PodInfo
}

func NewClusterInfo

func NewClusterInfo() *ClusterInfo

func (*ClusterInfo) AddPodEndpoints

func (c *ClusterInfo) AddPodEndpoints(endpoints *v1.Endpoints)

TODO: handle merger of pod info

func (*ClusterInfo) GetPodInfo

func (c *ClusterInfo) GetPodInfo(podAddress string) PodInfo

func (*ClusterInfo) UpdatePods

func (c *ClusterInfo) UpdatePods(podList *v1.PodList)

type PodInfo

type PodInfo struct {
	Name      string
	IP        string
	Host      string
	Restarts  int
	StartTime string
	Info      string
}

Jump to

Keyboard shortcuts

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