spiegel_podman/pkg
Valentin Rothberg f4e873c4e1 auto updates
Add support to auto-update containers running in systemd units as
generated with `podman generate systemd --new`.

`podman auto-update` looks up containers with a specified
"io.containers.autoupdate" label (i.e., the auto-update policy).

If the label is present and set to "image", Podman reaches out to the
corresponding registry to check if the image has been updated.  We
consider an image to be updated if the digest in the local storage is
different than the one of the remote image.  If an image must be
updated, Podman pulls it down and restarts the container.  Note that the
restarting sequence relies on systemd.

At container-creation time, Podman looks up the "PODMAN_SYSTEMD_UNIT"
environment variables and stores it verbatim in the container's label.
This variable is now set by all systemd units generated by
`podman-generate-systemd` and is set to `%n` (i.e., the name of systemd
unit starting the container).  This data is then being used in the
auto-update sequence to instruct systemd (via DBUS) to restart the unit
and hence to restart the container.

Note that this implementation of auto-updates relies on systemd and
requires a fully-qualified image reference to be used to create the
container.  This enforcement is necessary to know which image to
actually check and pull.  If we used an image ID, we would not know
which image to check/pull anymore.

Fixes: #3575
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-03-17 17:18:56 +01:00
..
adapter auto updates 2020-03-17 17:18:56 +01:00
annotations Add ContainerManager annotation to created containers 2019-09-10 09:37:14 +02:00
api add apiv2 healthcheck code 2020-03-13 07:43:12 -05:00
apparmor golangci: enable goimports 2020-03-05 20:03:44 +01:00
autoupdate auto updates 2020-03-17 17:18:56 +01:00
bindings add apiv2 healthcheck code 2020-03-13 07:43:12 -05:00
cgroups update systemd & dbus dependencies 2020-03-10 18:34:55 +01:00
channelwriter account for varlink calls that dont use more 2019-07-10 08:50:05 -05:00
criu Add helper function to read out CRIU version 2018-10-23 12:52:03 +02:00
ctime Re-add int64 casts for ctime 2019-07-23 15:43:40 -04:00
env Merge pull request #5381 from vrothberg/ENVFIX 2020-03-04 13:26:48 -05:00
errorhandling first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
hooks golangci: enable goimports 2020-03-05 20:03:44 +01:00
inspect consolidate env handling into pkg/env 2020-03-03 11:47:24 +01:00
kubeutils Remove dependency on kubernetes 2018-03-27 21:55:33 +00:00
logs first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
lookup golangci: enable goimports 2020-03-05 20:03:44 +01:00
namespaces namespaces: by default create cgroupns on cgroups v2 2019-11-05 17:29:01 +01:00
netns network: hide EPERM warning when rootless 2019-10-01 08:51:58 +02:00
network network create should use firewall plugin 2020-02-27 14:39:31 -06:00
registrar Update registrar unit tests to match them of cri-o 2019-04-04 08:53:32 +02:00
registries podman: mirror information 2019-12-12 19:53:46 -03:00
resolvconf use storage/pkg/ioutils 2020-03-09 09:03:51 +01:00
rootless Merge pull request #5324 from giuseppe/fix-running-no-pause 2020-02-25 21:16:26 +01:00
rootlessport rootlessport: detect rootless-child exit 2020-03-12 11:39:13 +01:00
seccomp apiv2 container create using specgen 2020-02-19 15:20:15 -06:00
signal add pkg/signal 2020-02-14 15:04:14 +01:00
spec auto updates 2020-03-17 17:18:56 +01:00
specgen auto updates 2020-03-17 17:18:56 +01:00
sysinfo Setup a reasonable default for pids-limit 4096 2019-10-04 16:09:13 -04:00
systemd auto updates 2020-03-17 17:18:56 +01:00
timetype make lint: enable gocritic 2020-01-13 14:27:02 +01:00
tracing make lint: include pkg/tracing 2020-01-14 09:54:48 +01:00
trust codespell: spelling corrections 2019-11-13 08:15:00 +11:00
util Allow users to set TMPDIR environment 2020-03-06 10:21:37 -05:00
varlinkapi Add network options to podman pod create 2020-02-19 11:29:30 -05:00