opm CLI reference
The opm
command-line interface (CLI) is a tool for creating and maintaining Operator catalogs.
opm
CLI syntax
$ opm <command> [<subcommand>] [<argument>] [<flags>]
Flag | Description |
---|---|
| Skip TLS certificate verification for container image registries while pulling bundles or indexes. |
The SQLite-based catalog format, including the related CLI commands, is a deprecated feature. Deprecated functionality is still included in OKD and continues to be supported; however, it will be removed in a future release of this product and is not recommended for new deployments. For the most recent list of major functionality that has been deprecated or removed within OKD, refer to the Deprecated and removed features section of the OKD release notes. |
index
Generate Operator index container images from pre-existing Operator bundles.
Command syntax
$ opm index <subcommand> [<flags>]
Subcommand | Description |
---|---|
| Add Operator bundles to an index. |
| Export an Operator from an index in the |
| Prune an index of all but specified packages. |
| Prune an index of stranded bundles, which are bundles that are not associated with a particular image. |
| Delete an entire Operator from an index. |
add
Add Operator bundles to an index.
Command syntax
$ opm index add [<flags>]
Flag | Description |
---|---|
| Container image for on-image |
| Tool to build container images: |
| Comma-separated list of bundles to add. |
| Tool to interact with container images, such as for saving and building: |
| Previous index to add to. |
| If enabled, only creates the Dockerfile and saves it to local disk. |
| Graph update mode that defines how channel graphs are updated: |
| Optional: If generating the Dockerfile, specify a file name. |
| Allow registry load errors. |
| Tool to pull container images: |
| Custom tag for container image being built. |
export
Export an Operator from an index in the appregistry
format.
Command syntax
$ opm index export [<flags>]
Flag | Description |
---|---|
| Index to get the packages from. |
| Directory where the downloaded Operator bundles are stored. The default directory is |
| Tool to interact with container images, such as for saving and building: |
| Help for the |
| Comma-separated list of packages to export. |
prune
Prune an index of all but specified packages.
Command syntax
$ opm index prune [<flags>]
Flag | Description |
---|---|
| Container image for on-image |
| Tool to interact with container images, such as for saving and building: |
| Index to prune. |
| If enabled, only creates the Dockerfile and saves it to local disk. |
| Optional: If generating the Dockerfile, specify a file name. |
| Comma-separated list of packages to keep. |
| Allow registry load errors. |
| Custom tag for container image being built. |
prune-stranded
Prune an index of stranded bundles, which are bundles that are not associated with a particular image.
Command syntax
$ opm index prune-stranded [<flags>]
Flag | Description |
---|---|
| Container image for on-image |
| Tool to interact with container images, such as for saving and building: |
| Index to prune. |
| If enabled, only creates the Dockerfile and saves it to local disk. |
| Optional: If generating the Dockerfile, specify a file name. |
| Allow registry load errors. |
| Custom tag for container image being built. |
rm
Delete an entire Operator from an index.
Command syntax
$ opm index rm [<flags>]
Flag | Description |
---|---|
| Container image for on-image |
| Tool to build container images: |
| Tool to interact with container images, such as for saving and building: |
| Previous index to delete from. |
| If enabled, only creates the Dockerfile and saves it to local disk. |
| Comma-separated list of Operators to delete. |
| Optional: If generating the Dockerfile, specify a file name. |
| Allow registry load errors. |
| Tool to pull container images: |
| Custom tag for container image being built. |
init
Generate an olm.package
declarative config blob.
Command syntax
$ opm init <package_name> [<flags>]
Flag | Description |
---|---|
| The channel that subscriptions will default to if unspecified. |
| Path to the Operator’s |
| Path to package’s icon. |
| Output format: |
render
Generate a declarative config blob from the provided index images, bundle images, and SQLite database files.
Command syntax
$ opm render <index_image | bundle_image | sqlite_file> [<flags>]
Flag | Description |
---|---|
| Output format: |
validate
Validate the declarative config JSON file(s) in a given directory.
Command syntax
$ opm validate <directory> [<flags>]
serve
Serve declarative configs via a GRPC server.
The declarative config directory is loaded by the |
Command syntax
$ opm serve <source_path> [<flags>]
Flag | Description |
---|---|
| Enable debug logging. |
| Port number to serve on. Default: |
| Path to a container termination log file. Default: |