kube

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathToKubeConfig

func PathToKubeConfig() (string, error)

Types

type Client

type Client struct {
	Clientset *kubernetes.Clientset
}

func NewClient

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

func NewDefaultClient

func NewDefaultClient() (*Client, error)

func (*Client) GetImagesFromDeployments

func (kc *Client) GetImagesFromDeployments(ctx context.Context, namespace string) ([]string, error)

func (*Client) GetImagesFromNamespace

func (kc *Client) GetImagesFromNamespace(ctx context.Context, namespace string) ([]string, error)

Get images from deployments and Pods returning a list of unique images

func (*Client) GetImagesFromPods

func (kc *Client) GetImagesFromPods(ctx context.Context, namespace string) ([]string, error)

func (*Client) GetNamespace

func (kc *Client) GetNamespace(ctx context.Context, namespace string) (*corev1.Namespace, error)

func (*Client) ListCronJobs

func (kc *Client) ListCronJobs(ctx context.Context, namespace string) (*batchv1beta1.CronJobList, error)

func (*Client) ListDeployments

func (kc *Client) ListDeployments(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)

func (*Client) ListNamespaces

func (kc *Client) ListNamespaces(ctx context.Context) (*corev1.NamespaceList, error)

func (*Client) ListPods

func (kc *Client) ListPods(ctx context.Context, namespace string) (*corev1.PodList, error)

func (*Client) ListStatefulSets

func (kc *Client) ListStatefulSets(ctx context.Context, namespace string) (*appsv1.StatefulSetList, error)

Jump to

Keyboard shortcuts

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