Skip to content

Commit 74dd00e

Browse files
author
Oleg Bulatov
committed
Select manifest for default platform from manifest lists
1 parent 994471f commit 74dd00e

File tree

8 files changed

+205
-152
lines changed

8 files changed

+205
-152
lines changed

pkg/image/apis/image/types.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ const (
2828
// ExcludeImageSecretAnnotation indicates that a secret should not be returned by imagestream/secrets.
2929
ExcludeImageSecretAnnotation = "openshift.io/image.excludeSecret"
3030

31+
// DefaultArchAnnotation represents an architecture that should be
32+
// selected if an image uses a manifest list and it should be
33+
// downconverted.
34+
DefaultArchAnnotation = "openshift.io/image.defaultArch"
35+
36+
// DefaultOSAnnotation represents an operation system that should be
37+
// selected if an image uses a manifest list and it should be
38+
// downconverted.
39+
DefaultOSAnnotation = "openshift.io/image.defaultOS"
40+
3141
// DefaultImageTag is used when an image tag is needed and the configuration does not specify a tag to use.
3242
DefaultImageTag = "latest"
3343

pkg/image/importer/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestDockerV1Fallback(t *testing.T) {
200200

201201
retriever := &mockRetriever{err: fmt.Errorf("does not support v2 API")}
202202
im := NewImageStreamImporter(retriever, 5, nil, nil)
203-
if err := im.Import(ctx, isi); err != nil {
203+
if err := im.Import(ctx, isi, nil); err != nil {
204204
t.Fatal(err)
205205
}
206206
if images := isi.Status.Repository.Images; len(images) != 2 || images[0].Tag != "tag1" || images[1].Tag != "test" {

0 commit comments

Comments
 (0)