spiegel_podman/pkg/adapter
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
..
shortcuts make lint: enable gocritic 2020-01-13 14:27:02 +01:00
autoupdate.go auto updates 2020-03-17 17:18:56 +01:00
autoupdate_remote.go auto updates 2020-03-17 17:18:56 +01:00
checkpoint_restore.go Correctly export the root file-system changes 2019-12-09 13:29:36 +01:00
client.go Add service endpoint 2020-01-21 16:35:45 -06:00
client_config.go Add service endpoint 2020-01-21 16:35:45 -06:00
client_unix.go Avoid hard-coding path to varlink and podman 2019-10-01 19:46:54 +02:00
client_windows.go Apply changes also to the windows implementation 2019-10-02 20:49:09 +02:00
containers.go Merge pull request #4772 from boaz0/closes_4628 2020-03-04 10:58:10 -05:00
containers_remote.go consolidate env handling into pkg/env 2020-03-03 11:47:24 +01:00
errors.go remove libpod from main 2019-06-25 13:51:24 -05:00
images_remote.go Refactor image tree for API usage 2020-02-17 11:12:35 +01:00
info_remote.go Fix podman-remote info to show registry data 2020-01-07 19:38:46 -05:00
network.go network create should use firewall plugin 2020-02-27 14:39:31 -06:00
pods.go consolidate env handling into pkg/env 2020-03-03 11:47:24 +01:00
pods_remote.go Add network options to podman pod create 2020-02-19 11:29:30 -05:00
reset.go Add podman system reset command 2019-11-29 05:34:52 -05:00
reset_remote.go Add podman system reset command 2019-11-29 05:34:52 -05:00
runtime.go Refactor image tree for API usage 2020-02-17 11:12:35 +01:00
runtime_remote.go remove imagefilter for varlink remote client 2020-03-12 12:43:32 -05:00
runtime_remote_supported.go enable podman-remote on windows 2019-04-30 15:28:39 -05:00
sigproxy_linux.go eat signal 23 in signal proxy 2020-03-13 08:19:08 -05:00
terminal.go add pkg/signal 2020-02-14 15:04:14 +01:00
terminal_linux.go Switch to bufio Reader for exec streams 2019-10-31 11:20:12 -04:00
volumes_remote.go Implement backend for 'volume inspect' 2019-08-02 15:08:30 -04:00