From 5db22e0abf390867371c7411444f34fffa7780c9 Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Tue, 25 Oct 2022 16:33:43 -0400 Subject: [PATCH] Adds the procedure to import manifest list --- ...nifest-list-through-imagestreamimport.adoc | 44 +++++++++++++++++++ modules/importmode-configuration-fields.adoc | 23 ++++++++++ openshift_images/image-streams-manage.adoc | 3 ++ 3 files changed, 70 insertions(+) create mode 100644 modules/importing-manifest-list-through-imagestreamimport.adoc create mode 100644 modules/importmode-configuration-fields.adoc diff --git a/modules/importing-manifest-list-through-imagestreamimport.adoc b/modules/importing-manifest-list-through-imagestreamimport.adoc new file mode 100644 index 0000000000..78dbb3b08a --- /dev/null +++ b/modules/importing-manifest-list-through-imagestreamimport.adoc @@ -0,0 +1,44 @@ +// Module included in the following assemblies: +// * openshift_images/image-streams-manage.adoc + +:_content-type: PROCEDURE +[id="importing-manifest-list-through-imagestreamimport_{context}"] += Importing a manifest list through ImageStreamImport + + +You can use the `ImageStreamImport` resource to find and import image manifests from other container image registries into the cluster. Individual images or an entire image repository can be imported. + +Use the following procedure to import a manifest list through the `ImageStreamImport` object with the `importMode` value. + +.Procedure + +. Create an `ImageStreamImport` YAML file and set the `importMode` parameter to `PreserveOriginal` on the tags that you will import as a manifest list: ++ +[source,yaml] +---- +apiVersion: image.openshift.io/v1 +kind: ImageStreamImport +metadata: + name: app + namespace: myapp +spec: + import: true + images: + - from: + kind: DockerImage + name: // + to: + name: latest + referencePolicy: + type: Source + importPolicy: + importMode: "PreserveOriginal" +---- + +. Create the `ImageStreamImport` by running the following command: ++ +[source,terminal] +---- +$ oc create -f +---- + diff --git a/modules/importmode-configuration-fields.adoc b/modules/importmode-configuration-fields.adoc new file mode 100644 index 0000000000..97509950da --- /dev/null +++ b/modules/importmode-configuration-fields.adoc @@ -0,0 +1,23 @@ +// Module included in the following assemblies: +// * assembly/openshift_images/managing-image-streams.adoc + +:_content-type: CONCEPT +[id="importmode-configuration-fields_{context}"] += importMode configuration fields + +The following table describes the configuration fields available for the `importMode` value: + +[cols="3a,8a",options="header"] +|=== +|Parameter |Description + +| *Legacy* | The default value for `importMode`. When active, the manifest list is discarded, and a single sub-manifest is imported. The platform is chosen in the following order of priority: + +. Tag annotations +. Control plane architecture +. Linux/AMD64 +. The first manifest in the list + +| *PreserveOriginal* | When active, the original manifest is preserved. For manifest lists, the manifest list and all of its sub-manifests are imported. + +|=== \ No newline at end of file diff --git a/openshift_images/image-streams-manage.adoc b/openshift_images/image-streams-manage.adoc index 8e51c1324b..407a858f9f 100644 --- a/openshift_images/image-streams-manage.adoc +++ b/openshift_images/image-streams-manage.adoc @@ -31,3 +31,6 @@ include::modules/images-imagestream-import.adoc[leveloffset=+2] include::modules/images-imagestream-import-images-private-registry.adoc[leveloffset=+1] include::modules/images-allow-pods-to-reference-images-from-secure-registries.adoc[leveloffset=+2] + +include::modules/importing-manifest-list-through-imagestreamimport.adoc[leveloffset=+1] +include::modules/importmode-configuration-fields.adoc[leveloffset=+2]