diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-07-15 11:27:25 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-07-15 11:39:50 +0200 |
commit | 59f31d86acdf54019b081ca86340d5c33dbcf3b9 (patch) | |
tree | 3b243e70c88bb03880d6f1fc459d5f1d57e07cce /pkg/domain/entities/auto-update.go | |
parent | 1568247ec8fa0c1a23bbd4631c1ea2fcfd85e281 (diff) | |
download | podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.tar.gz podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.tar.bz2 podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.zip |
auto-update: add --dry-run
Add a --dry-run flag to `podman auto-update` which will look for new
images but won't perform any pull or restart any service or container.
The "UPDATED" column will now indicate the availability of a newer image
via "pending".
```
$ podman auto-update --dry-run
UNIT CONTAINER IMAGE POLICY UPDATED
container-test.service 08fd34e533fd (test) localhost:5000/busybox registry false
```
Fixes: #9949
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/entities/auto-update.go')
-rw-r--r-- | pkg/domain/entities/auto-update.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/domain/entities/auto-update.go b/pkg/domain/entities/auto-update.go index d74462b86..eed617bf8 100644 --- a/pkg/domain/entities/auto-update.go +++ b/pkg/domain/entities/auto-update.go @@ -4,6 +4,10 @@ package entities type AutoUpdateOptions struct { // Authfile to use when contacting registries. Authfile string + // Only check for but do not perform any update. If an update is + // pending, it will be indicated in the Updated field of + // AutoUpdateReport. + DryRun bool } // AutoUpdateReport contains the results from running auto-update. @@ -18,7 +22,7 @@ type AutoUpdateReport struct { Policy string // SystemdUnit running a container configured for auto updates. SystemdUnit string - // Indicates whether the image was updated and the container (and - // systemd unit) restarted. + // Indicates the update status: true, false, failed, pending (see + // DryRun). Updated string } |