Files
podman/pkg/domain/entities/auto-update.go
Valentin Rothberg d874790bc6 auto update: fix usage of --authfile
The --authfile flag has been ignored.  Fix that and add a test to make
sure we won't regress another time.  Requires a new --tls-verify flag
to actually test the code.

Also bump c/common since common/pull/1538 is required to correctly check
for updates.  Note that I had to use the go-mod-edit-replace trick on
c/common as c/buildah would otherwise be moved back to 1.30.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2218315
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-05 08:30:39 +02:00

37 lines
1.2 KiB
Go

package entities
import "github.com/containers/image/v5/types"
// AutoUpdateOptions are the options for running auto-update.
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
// If restarting the service with the new image failed, restart it
// another time with the previous image.
Rollback bool
// Allow contacting registries over HTTP, or HTTPS with failed TLS
// verification. Note that this does not affect other TLS connections.
InsecureSkipTLSVerify types.OptionalBool
}
// AutoUpdateReport contains the results from running auto-update.
type AutoUpdateReport struct {
// ID of the container *before* an update.
ContainerID string
// Name of the container *before* an update.
ContainerName string
// Name of the image.
ImageName string
// The configured auto-update policy.
Policy string
// SystemdUnit running a container configured for auto updates.
SystemdUnit string
// Indicates the update status: true, false, failed, pending (see
// DryRun).
Updated string
}