Skip to content

Supporting single vs multi arch images in a stack #244

Closed
@elsony

Description

@elsony

The devfile currently contains image information as part of the container component information. This works well if one single image can be run in a different environment or system architecture, e.g. images that can run on p and z may be different from other images. With the current devfile 2.0 spec, the stack provider will need to provide a different stack to allow different images to be run on different system architectures.

Here is a proposed solution for resolving this:

  1. Introduce a built-in environment variable to describe the architecture, e.g. PROCESSOR_ARCHITECTURE.
  2. The tools (e.g. odo, Che) who are running the devfile will need to set that environment variable and resolve that when running the devfile.
  3. On the image field, the user can use the ${PROCESSOR_ARCHITECTURE} reference to control the path of the image. To keep the implementation simple, the image URL can simply have that variable as part of the image location. (The alternative is to have an explicit list of different images based on different architectures.)
    Example of variable usage:
components:
  - name: runtime
    container:
      image: registry.access.redhat.com/ubi8/${PROCESSOR_ARCHITECTURE}/nodejs-12:1-45
      memoryLimit: 1024Mi
      mountSources: true
      sourceMapping: /project
      endpoints:
        - name: http-3000
          targetPort: 3000
  1. We also need a way for a stack to declare the list of architectures that a given stack supports via tags. Using a processorArchitecture field in metadata (separated by , for a list of multiple entries)

We can have 2 models:

  • opt-out model: by default assume a stack supports all architecture and a stack can specify the list of supported architecture in the metadata in a devfile
  • opt-in model: by default assume a stack supports no architecture and a stack must specify the list of supported architecture in the metadata in a devfile before the tools can use it.

Metadata

Metadata

Assignees

Labels

area/apiEnhancement or issue related to the api/devfile specificationarea/registryDevfile registry for stacks and infrastructurestatus/blocked

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions