autoupdate

package
v5.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PolicyDefault is the default policy denoting no auto updates.
	PolicyDefault Policy = "disabled"
	// PolicyRegistryImage is the policy to update as soon as there's a new image found.
	PolicyRegistryImage = "registry"
	// PolicyLocalImage is the policy to run auto-update based on a local image
	PolicyLocalImage = "local"
)

Variables

This section is empty.

Functions

func AutoUpdate

func AutoUpdate(ctx context.Context, runtime *libpod.Runtime, options entities.AutoUpdateOptions) ([]*entities.AutoUpdateReport, []error)

/ AutoUpdate looks up containers with a specified auto-update policy and acts accordingly.

If the policy is set to PolicyRegistryImage, 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.

If the policy is set to PolicyLocalImage, it checks if the image of a running container is different than the local one. If the image digests differ, it restarts the systemd unit with the new image.

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

Types

type Policy

type Policy string

Policy represents an auto-update policy.

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