kubernetes

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ECRImagesFromPods

func ECRImagesFromPods(pods []*apiv1.Pod) map[string][]string

ECRImagesFromPods converts the given list of pods to a map where the keys are the ECR repository names and their values are a slice of strings containing the unique image tags referenced by those pods.

Types

type KubernetesClient

type KubernetesClient interface {
	ListAllPods(namespace []*string) ([]*apiv1.Pod, error)
}

KubernetesClient defines the expected interface of any object capable of listing pods from a Kubernetes cluster.

type KubernetesClientImpl

type KubernetesClientImpl struct {
	// contains filtered or unexported fields
}

func NewKubernetesClient

func NewKubernetesClient(kubeconfig string) (*KubernetesClientImpl, error)

NewKubernetesClient returns a client capable of talking to the API server of a Kubernetes cluster specified in the given kubeconfig filepath. If no kubeconfig filepath is specified, it assumes it's running inside a Kubernetes cluster, and will try to connect to it via the exposed service account.

func (*KubernetesClientImpl) ListAllPods

func (c *KubernetesClientImpl) ListAllPods(namespace []*string) ([]*apiv1.Pod, error)

ListAllPods returns all pods from the given namespaces.

Jump to

Keyboard shortcuts

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