containers

package
v0.0.0-...-1709b1e Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 17 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 {
	Kube *kube.Connection
}

Client represents a kubernetes client. Having a struct around this allows us to implement a fake client in tests

func NewClient

func NewClient(kubeContext string) *Client

NewClient is a constructor to create a new Client

func (*Client) Find

func (c *Client) Find(ctx context.Context, namespace string) (*Results, error)

Find is the primary function for this package that returns the results of images found in the cluster and whether they are out of date or not

type ErroredImage

type ErroredImage struct {
	Image string
	Err   string
}

ErroredImage is an image that failed to parse for any number of reasons. The error message is captured for later logging

type Image

type Image struct {
	Name         string
	Prefix       string
	Current      *Tag
	Newest       *Tag
	NewestPatch  *Tag
	NewestMinor  *Tag
	StrictSemver bool

	WorkLoads []Workload
	// contains filtered or unexported fields
}

Image contains all the relevant data for reporting an out of date image

type PodData

type PodData struct {
	Name           string
	Namespace      string
	InitContainers []string
	Containers     []string
}

PodData represents a pod and it's images so that we can report the namespace and other information later

type Results

type Results struct {
	Images    []*Image
	ErrImages []*ErroredImage
}

Results is a struct that contains a list of Images and a list of ErroredImages. This is the main thing that is returned from this package

type Tag

type Tag struct {
	Value string
	// contains filtered or unexported fields
}

Tag represents one single tag of a container image

type Workload

type Workload struct {
	Name      string
	Namespace string
	Kind      string
	Container string
}

Workload contains all the relevant data for the container workload

Jump to

Keyboard shortcuts

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