worker/gcp: allow setting Bucket in worker configuration

Extend the worker's configuration to allow setting GCP Bucket to use
when uploading images to GCP. The value from the configuration is used
only if not provided in the TargetOptions of the job.

In GCP, the region of the bucket does not limit importing of the image
to a particular region. So it is completely possible to use a single
Bucket to import images to any and all regions.

Return an error in case no bucket name was set in the job nor in the
worker configuration.
This commit is contained in:
Tomáš Hozza 2022-09-26 18:30:49 +02:00 committed by Ondřej Budai
parent cc53f5423e
commit b54b8fa3ab
3 changed files with 18 additions and 6 deletions

View file

@ -23,6 +23,7 @@ type kojiServerConfig struct {
type gcpConfig struct {
Credentials string `toml:"credentials"`
Bucket string `toml:"bucket"`
}
type azureConfig struct {