k8s

package
v0.0.0-...-e717c8f Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 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 Client

type Client struct {
	Clientset kubernetes.Interface
}

func NewClient

func NewClient(kubeconfig string) (*Client, error)

NewClient returns a new client and error

func (*Client) ListDeployments

func (c *Client) ListDeployments(ctx context.Context, ns string) (*appsv1.DeploymentList, error)

gererate function that returns a list of v1.Deployment objects

func (*Client) ListNamespaces

func (c *Client) ListNamespaces(ctx context.Context) ([]string, error)

func (*Client) ListNodes

func (c *Client) ListNodes(ctx context.Context) ([]string, error)

ListNodes returns a list of nodes and error

func (*Client) ListPodsByLabels

func (c *Client) ListPodsByLabels(ctx context.Context, ns string, labels map[string]string) (*v1.PodList, error)

ListPodsByLabels returns a list of pods that match set of labels provided in the map

func (*Client) NodeToZoneMap

func (c *Client) NodeToZoneMap(ctx context.Context) (map[string]string, error)

NodeToZoneMap returns a map that maps node name to AZ it runs in

Jump to

Keyboard shortcuts

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