This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.5. Working with bundle images
You can use the Operator SDK to package Operators using the Bundle Format.
4.5.1. Building a bundle image 复制链接链接已复制到粘贴板!
You can build, push, and validate an Operator bundle image using the Operator SDK.
Prerequisites
- Operator SDK version 0.17.2
-
podman
version 1.4.4+ - An Operator project generated using the Operator SDK
Procedure
From your Operator project directory, build the bundle image using the Operator SDK:
operator-sdk bundle create \ quay.io/<namespace>/test-operator:v0.1.0 \ -b podman
$ operator-sdk bundle create \ quay.io/<namespace>/test-operator:v0.1.0 \
1 -b podman
2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意If your local manifests are not located in the default
<project_root>/deploy/olm-catalog/test-operator/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 quay.io
$ podman login quay.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Push the bundle image to the registry:
podman push quay.io/<namespace>/test-operator:v0.1.0
$ podman push quay.io/<namespace>/test-operator:v0.1.0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate the bundle image in the remote registry:
operator-sdk bundle validate \ quay.io/<namespace>/test-operator:v0.1.0 \ -b podman
$ operator-sdk bundle validate \ quay.io/<namespace>/test-operator:v0.1.0 \ -b podman
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.5.2. Additional resources 复制链接链接已复制到粘贴板!
- See Operator Framework packaging formats for more details on the Bundle Format.