kube

package
v0.0.0-...-f91a3ff Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8s

type K8s interface {
	ListNodes() (*v1.NodeList, error)
	ListNodesByLabel(label string) (*v1.NodeList, error)
	ListNodeIPByLabel(label string) ([]net.IP, error)
	ListResources(gvr schema.GroupVersionResource, namespace string, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
}

func NewK8sClient

func NewK8sClient(kubeconfig string, apiServer string) (K8s, error)

type K8sClient

type K8sClient struct {
	//client *kubernetes.Clientset
	Client kubernetes.Client
}

func (*K8sClient) ListNodeIPByLabel

func (c *K8sClient) ListNodeIPByLabel(label string) ([]net.IP, error)

func (*K8sClient) ListNodes

func (c *K8sClient) ListNodes() (*v1.NodeList, error)

func (*K8sClient) ListNodesByLabel

func (c *K8sClient) ListNodesByLabel(label string) (*v1.NodeList, error)

func (*K8sClient) ListResources

Jump to

Keyboard shortcuts

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