Documentation
¶
Index ¶
Constants ¶
View Source
const ( //EvictionKind EvictionKind EvictionKind = "Eviction" //EvictionSubresource EvictionSubresource EvictionSubresource = "pods/eviction" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeClient ¶
type KubeClient interface {
UpK8sNode(*client.HostNode) (*v1.Node, error)
DownK8sNode(nodename string) error
GetAllPods() (pods []*v1.Pod, err error)
GetPods(namespace string) (pods []*v1.Pod, err error)
GetNodeByName(nodename string) (*v1.Node, error)
GetNodes() ([]*v1.Node, error)
GetNode(nodeName string) (*v1.Node, error)
CordonOrUnCordon(nodeName string, drain bool) (*v1.Node, error)
UpdateLabels(nodeName string, labels map[string]string) (*v1.Node, error)
DeleteOrEvictPodsSimple(nodeName string) error
GetPodsByNodes(nodeName string) (pods []v1.Pod, err error)
GetEndpoints(namespace string, selector labels.Selector) ([]*v1.Endpoints, error)
GetServices(namespace string, selector labels.Selector) ([]*v1.Service, error)
Stop()
}
KubeClient KubeClient
func NewKubeClient ¶
func NewKubeClient(cfg *conf.Conf) (KubeClient, error)
NewKubeClient NewKubeClient
Click to show internal directories.
Click to hide internal directories.