thermite

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package thermite removes old Amazon Elastic Container Registry images that are not currently deployed in a Kubernetes cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

A Client removes old images from Amazon Elastic Container Registry that are not currently deployed in a Kubernetes cluster.

func NewClient

func NewClient(taker census.Taker, gc prune.GarbageCollector) (*Client, error)

NewClient returns a Client that removes eligible images from ecr, excluding images currently deployed in kubernetes. If no WithPeriodTagKey options are specified in opts, DefaultPeriodTagKey will be used.

func (*Client) Run

func (c *Client) Run(ctx context.Context, until time.Time) (pruned []string, err error)

Run looks at every repository in the Amazon Elastic Container Registry associated with c, checks for an AWS resource tag on the repository that specifies a prune period (a positive integer representing the number of days that must pass after an image is pushed to the repository before it can be removed), and if the tag is present, removes any images that were pushed that many days before until. Run returns the list of image references that were pruned, along with any error that occurred.

Jump to

Keyboard shortcuts

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