Skip to content

Commit 7b36998

Browse files
Merge pull request #16322 from dmage/manifest-list-linux-amd64
Automatic merge from submit-queue (batch tested with PRs 13840, 16033, 16322, 16441) Import manifest lists with linux/amd64 platform This is an alternative for #16319
2 parents 8602aca + 27c1eb4 commit 7b36998

File tree

9 files changed

+201
-156
lines changed

9 files changed

+201
-156
lines changed

pkg/image/apis/image/types.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ const (
3939
// reversed order of their addition (from newest to oldest).
4040
DockerImageLayersOrderDescending = "descending"
4141

42+
// ImporterPreferArchAnnotation represents an architecture that should be
43+
// selected if an image uses a manifest list and it should be
44+
// downconverted.
45+
ImporterPreferArchAnnotation = "importer.image.openshift.io/prefer-arch"
46+
47+
// ImporterPreferOSAnnotation represents an operation system that should
48+
// be selected if an image uses a manifest list and it should be
49+
// downconverted.
50+
ImporterPreferOSAnnotation = "importer.image.openshift.io/prefer-os"
51+
4252
// DefaultImageTag is used when an image tag is needed and the configuration does not specify a tag to use.
4353
DefaultImageTag = "latest"
4454

@@ -157,7 +167,7 @@ const (
157167
SignatureRevoked = "Revoked"
158168
)
159169

160-
/// SignatureConditionType is a type of image signature condition.
170+
// SignatureConditionType is a type of image signature condition.
161171
type SignatureConditionType string
162172

163173
// SignatureCondition describes an image signature condition of particular kind at particular probe time.
@@ -485,7 +495,7 @@ type ImageStreamImportStatus struct {
485495
Images []ImageImportStatus
486496
}
487497

488-
// RepositoryImport indicates to load a set of tags from a given Docker image repository
498+
// RepositoryImportSpec indicates to load a set of tags from a given Docker image repository
489499
type RepositoryImportSpec struct {
490500
// The source of the import, only kind DockerImage is supported
491501
From kapi.ObjectReference

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)