diff --git a/go.mod b/go.mod index d6524e8e..699e4a16 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce // indirect github.com/drone/envsubst v1.0.2 github.com/gardener/component-spec/bindings-go v0.0.53 - github.com/gardener/image-vector v0.8.0 + github.com/gardener/image-vector v0.9.0 github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v0.4.0 github.com/go-logr/zapr v0.3.0 diff --git a/go.sum b/go.sum index 0752c18d..f2ecafa2 100644 --- a/go.sum +++ b/go.sum @@ -293,8 +293,8 @@ github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXt github.com/gardener/component-spec/bindings-go v0.0.52/go.mod h1:kQFMTWowNAp9tOp6aImQa/NoLzfvX29jN5Qgud9rpQU= github.com/gardener/component-spec/bindings-go v0.0.53 h1:9M6YOs8FYDSmGJqNqdCFolo3buuQalJSuUy7X8FIXm4= github.com/gardener/component-spec/bindings-go v0.0.53/go.mod h1:kQFMTWowNAp9tOp6aImQa/NoLzfvX29jN5Qgud9rpQU= -github.com/gardener/image-vector v0.8.0 h1:BZTlunUVK2BnY05sQ7khyc1MAQjhEBvXJkw+GM8URUg= -github.com/gardener/image-vector v0.8.0/go.mod h1:32SHGcbmmueeK9VkawsFcEbsoENXQPIuuYiFBUP+vMQ= +github.com/gardener/image-vector v0.9.0 h1:Njc/IywnV1mQjQyJH7Xv/M3kggXYos6OjkOk3nP14Ek= +github.com/gardener/image-vector v0.9.0/go.mod h1:32SHGcbmmueeK9VkawsFcEbsoENXQPIuuYiFBUP+vMQ= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/vendor/github.com/gardener/image-vector/pkg/overwrite.go b/vendor/github.com/gardener/image-vector/pkg/overwrite.go index c1b6e483..d98a0e96 100644 --- a/vendor/github.com/gardener/image-vector/pkg/overwrite.go +++ b/vendor/github.com/gardener/image-vector/pkg/overwrite.go @@ -428,7 +428,7 @@ func (io *imageOverwrite) findGenericImageResource(ctx context.Context, image Im if err != nil { return nil, fmt.Errorf("unable to parse resource version from resource %q of component %q: %w", res.GetName(), comp.GetName(), err) } - if constr != nil && !constr.Check(semverVersion) { + if image.TargetVersion != nil && !constr.Check(semverVersion) { rLog.V(9).Info("semver constraint does not match", "version", res.GetVersion(), "constraint", *image.TargetVersion) continue } @@ -440,16 +440,9 @@ func (io *imageOverwrite) findGenericImageResource(ctx context.Context, image Im return nil, fmt.Errorf("unable to parse oci access from resource %q of component %q: %w", res.GetName(), comp.GetName(), err) } - if image.TargetVersion == nil { - io.log.V(7).Info("found image with no target version", "image", image.Name) - entry.Tag = nil - images = append(images, entry) - return images, nil - } else { - targetVersion := semverVersion.String() - entry.TargetVersion = &targetVersion - images = append(images, entry) - } + targetVersion := semverVersion.String() + entry.TargetVersion = &targetVersion + images = append(images, entry) } } return images, nil diff --git a/vendor/modules.txt b/vendor/modules.txt index 46271907..e746a9ba 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -56,7 +56,7 @@ github.com/gardener/component-spec/bindings-go/codec github.com/gardener/component-spec/bindings-go/ctf github.com/gardener/component-spec/bindings-go/oci github.com/gardener/component-spec/bindings-go/utils/selector -# github.com/gardener/image-vector v0.8.0 +# github.com/gardener/image-vector v0.9.0 ## explicit github.com/gardener/image-vector/pkg # github.com/ghodss/yaml v1.0.0