autoupdate

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const AuthfileLabel = "io.containers.autoupdate.authfile"

Label denotes the container label key to specify authfile in container labels.

View Source
const Label = "io.containers.autoupdate"

Label denotes the container/pod label key to specify auto-update policies in container labels.

Variables

This section is empty.

Functions

func AutoUpdate

func AutoUpdate(runtime *libpod.Runtime, options Options) ([]string, []error)

AutoUpdate looks up containers with a specified auto-update policy and acts accordingly. If the policy is set to PolicyNewImage, it checks if the image on the remote registry is different than the local one. If the image digests differ, it pulls the remote image and restarts the systemd unit running the container.

It returns a slice of successfully restarted systemd units and a slice of errors encountered during auto update.

func ValidateImageReference

func ValidateImageReference(imageName string) error

ValidateImageReference checks if the specified imageName is a fully-qualified image reference to the docker transport (without digest). Such a reference includes a domain, name and tag (e.g., quay.io/podman/stable:latest). The reference may also be prefixed with "docker://" explicitly indicating that it's a reference to the docker transport.

Types

type Options

type Options struct {
	// Authfile to use when contacting registries.
	Authfile string
}

Options include parameters for auto updates.

type Policy

type Policy string

Policy represents an auto-update policy.

const (
	// PolicyDefault is the default policy denoting no auto updates.
	PolicyDefault Policy = "disabled"
	// PolicyNewImage is the policy to update as soon as there's a new image found.
	PolicyNewImage = "image"
)

func LookupPolicy

func LookupPolicy(s string) (Policy, error)

LookupPolicy looks up the corresponding Policy for the specified string. If none is found, an errors is returned including the list of supported policies.

Note that an empty string resolved to PolicyDefault.

Jump to

Keyboard shortcuts

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