diff --git a/modules/osdk-bundle-upgrade-olm.adoc b/modules/osdk-bundle-upgrade-olm.adoc index a009c1b49e..4849753673 100644 --- a/modules/osdk-bundle-upgrade-olm.adoc +++ b/modules/osdk-bundle-upgrade-olm.adoc @@ -34,14 +34,19 @@ $ operator-sdk run bundle //memcached-operator:v0.0.1 .Example output [source,terminal] ---- -INFO[0009] Successfully created registry pod: quay-io-demo-memcached-operator-v0-0-1 -INFO[0009] Created CatalogSource: memcached-operator-catalog -INFO[0010] OperatorGroup "operator-sdk-og" created -INFO[0010] Created Subscription: memcached-operator-v0-0-1-sub -INFO[0013] Approved InstallPlan install-bqggr for the Subscription: memcached-operator-v0-0-1-sub -INFO[0013] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.1" to reach 'Succeeded' phase -INFO[0013] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.1" to appear -INFO[0019] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Succeeded +INFO[0006] Creating a File-Based Catalog of the bundle "quay.io/demo/memcached-operator:v0.0.1" +INFO[0008] Generated a valid File-Based Catalog +INFO[0012] Created registry pod: quay-io-demo-memcached-operator-v1-0-1 +INFO[0012] Created CatalogSource: memcached-operator-catalog +INFO[0012] OperatorGroup "operator-sdk-og" created +INFO[0012] Created Subscription: memcached-operator-v0-0-1-sub +INFO[0015] Approved InstallPlan install-h9666 for the Subscription: memcached-operator-v0-0-1-sub +INFO[0015] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.1" to reach 'Succeeded' phase +INFO[0015] Waiting for ClusterServiceVersion ""my-project/memcached-operator.v0.0.1" to appear +INFO[0026] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Pending +INFO[0028] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Installing +INFO[0059] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Succeeded +INFO[0059] OLM has successfully installed "memcached-operator.v0.0.1" ---- . Upgrade the installed Operator by specifying the bundle image for the later Operator version: @@ -56,14 +61,16 @@ $ operator-sdk run bundle-upgrade //memcached-operator:v0.0.2 ---- INFO[0002] Found existing subscription with name memcached-operator-v0-0-1-sub and namespace my-project INFO[0002] Found existing catalog source with name memcached-operator-catalog and namespace my-project -INFO[0009] Successfully created registry pod: quay-io-demo-memcached-operator-v0-0-2 +INFO[0008] Generated a valid Upgraded File-Based Catalog +INFO[0009] Created registry pod: quay-io-demo-memcached-operator-v0-0-2 INFO[0009] Updated catalog source memcached-operator-catalog with address and annotations INFO[0010] Deleted previous registry pod with name "quay-io-demo-memcached-operator-v0-0-1" INFO[0041] Approved InstallPlan install-gvcjh for the Subscription: memcached-operator-v0-0-1-sub INFO[0042] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.2" to reach 'Succeeded' phase -INFO[0042] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: InstallReady -INFO[0043] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Installing -INFO[0044] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Succeeded +INFO[0019] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Pending +INFO[0042] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: InstallReady +INFO[0043] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Installing +INFO[0044] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Succeeded INFO[0044] Successfully upgraded to "memcached-operator.v0.0.2" ---- diff --git a/modules/osdk-deploy-olm.adoc b/modules/osdk-deploy-olm.adoc index 3481f39e3e..9aa59e67cb 100644 --- a/modules/osdk-deploy-olm.adoc +++ b/modules/osdk-deploy-olm.adoc @@ -43,22 +43,29 @@ $ operator-sdk olm status \ --olm-namespace=openshift-operator-lifecycle-manager ---- -. Run the Operator on your cluster by using the OLM integration in Operator SDK: +. Enter the following command to run the Operator on the cluster: + [source,terminal] ---- -$ operator-sdk run bundle \ - [-n ] \//<1> - //: +$ operator-sdk run bundle \//<1> + -n \//<2> + //: <3> ---- -<1> By default, the command installs the Operator in the currently active project in your `~/.kube/config` file. You can add the `-n` flag to set a different namespace scope for the installation. +<1> The `run bundle` command creates a valid file-based catalog and installs the Operator bundle on your cluster using OLM. +<2> Optional: By default, the command installs the Operator in the currently active project in your `~/.kube/config` file. You can add the `-n` flag to set a different namespace scope for the installation. +<3> If you do not specify an image, the command uses `quay.io/operator-framework/opm:latest` as the default index image. If you specify an image, the command uses the bundle image itself as the index image. ++ +[IMPORTANT] +==== +As of {product-title} 4.11, the `run bundle` command supports the file-based catalog format for Operator catalogs by default. The deprecated SQLite database format for Operator catalogs continues to be supported; however, it will be removed in a future release. It is recommended that Operator authors migrate their workflows to the file-based catalog format. +==== + This command performs the following actions: + -- * Create an index image referencing your bundle image. The index image is opaque and ephemeral, but accurately reflects how a bundle would be added to a catalog in production. * Create a catalog source that points to your new index image, which enables OperatorHub to discover your Operator. -* Deploy your Operator to your cluster by creating an `OperatorGroup`, `Subscription`, `InstallPlan`, and all other required objects, including RBAC. +* Deploy your Operator to your cluster by creating an `OperatorGroup`, `Subscription`, `InstallPlan`, and all other required resources, including RBAC. -- ifeval::["{context}" == "osdk-golang-tutorial"] diff --git a/operators/operator_sdk/osdk-working-bundle-images.adoc b/operators/operator_sdk/osdk-working-bundle-images.adoc index 4b350367f9..89cd61c502 100644 --- a/operators/operator_sdk/osdk-working-bundle-images.adoc +++ b/operators/operator_sdk/osdk-working-bundle-images.adoc @@ -10,6 +10,14 @@ You can use the Operator SDK to package, deploy, and upgrade Operators in the bu include::modules/osdk-bundle-operator.adoc[leveloffset=+1] include::modules/osdk-deploy-olm.adoc[leveloffset=+1] + +[role="_additional-resources"] +.Additional resources + +* xref:../../operators/understanding/olm-packaging-format.adoc#olm-file-based-catalogs_olm-packaging-format[File-based catalogs] in Operator Framework packaging format +* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-managing-custom-catalogs-fb[File-based catalogs] in Managing custom catalogs +* xref:../../operators/understanding/olm-packaging-format.adoc#olm-bundle-format_olm-packaging-format[Bundle format] + include::modules/osdk-publish-catalog.adoc[leveloffset=+1] [role="_additional-resources"]