Working with bundle images
You can use the Operator SDK to package Operators using the Bundle Format.
Building a bundle image
You can build, push, and validate an Operator bundle image using the Operator SDK.
Prerequisites
Operator SDK version 0.19.4
podman
version 1.9.3+An Operator project generated using the Operator SDK
Access to a registry that supports Docker v2-2
Procedure
From your Operator project directory, build the bundle image using the Operator SDK:
$ operator-sdk bundle create \
<registry>/<namespace>/<bundle_image_name>:<tag> \(1)
-b podman (2)
1 The image tag that you want the bundle image to have. 2 The CLI tool to use for building the container image, either docker
(default),podman
, orbuildah
. This example usespodman
.If your local manifests are not located in the default
<project_root>/deploy/olm-catalog/<bundle_name>/manifests
, specify the location with the—directory
flag.Log in to the registry where you want to push the bundle image. For example:
$ podman login <registry>
Push the bundle image to the registry:
$ podman push <registry>/<namespace>/<bundle_image_name>:<tag>
Validate the bundle image in the remote registry:
$ operator-sdk bundle validate \
<registry>/<namespace>/<bundle_image_name>:<tag> \
-b podman
Example output
INFO[0000] Unpacked image layers bundle-dir=/tmp/bundle-041168359 container-tool=podman
INFO[0000] running podman pull bundle-dir=/tmp/bundle-041168359 container-tool=podman
INFO[0002] running podman save bundle-dir=/tmp/bundle-041168359 container-tool=podman
INFO[0002] All validation tests have completed successfully bundle-dir=/tmp/bundle-041168359 container-tool=podman
Additional resources
See Operator Framework packaging formats for details on the Bundle Format.
See Managing custom catalogs for details on adding bundle images to index images by using the
opm
command.See Operator Lifecycle Manager workflow for details on how upgrades work for installed Operators.