Multiple Architectures

    Manifest lists

    The most straightforward way of building operators and operands supporting multiple architectures is to leverage manifest lists, specified by or OCI Image Index. A manifest list points to specific image manifests for one or more platforms.

    For convenience tools like allow to cross-build and manifest multi-arch containers on one host. For instance with buildah:

    The result can then be pushed to the desired registry.

    Docker with buildx provides similar capabilities.

    Caveats: the Dockerfile generated by the SDK for the operator explicitely references GOARCH=amd64 for go build. This can be amended to GOARCH=$TARGETARCH. Docker will automatically set the environment variable to the value specified by –platform. With buildah –build-arg will need to be used for the purpose.

    Caveats: When mirroring registries for disconnected installations (environments without internet connection) all the images referenced by a manifest list need to be copied, including images for architectures that may not be used in the environment.

    Operator Lifecycle Manager

    • All image references in the ClusterServiceVersion should be manifest lists containing the pointers to the image manifests for the supported architectures.