Skip to content

Commit e8408c7

Browse files
Merge pull request #47740 from michaelryanpeter/osdk_4.11--osdocs-3531-fbc-run-bundle
OSDOCS-3531--OSDK-1738: File-based catalog updates for `run bundle`
2 parents e2e9852 + 925d52c commit e8408c7

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

modules/osdk-bundle-upgrade-olm.adoc

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,19 @@ $ operator-sdk run bundle <registry>/<user>/memcached-operator:v0.0.1
3434
.Example output
3535
[source,terminal]
3636
----
37-
INFO[0009] Successfully created registry pod: quay-io-demo-memcached-operator-v0-0-1
38-
INFO[0009] Created CatalogSource: memcached-operator-catalog
39-
INFO[0010] OperatorGroup "operator-sdk-og" created
40-
INFO[0010] Created Subscription: memcached-operator-v0-0-1-sub
41-
INFO[0013] Approved InstallPlan install-bqggr for the Subscription: memcached-operator-v0-0-1-sub
42-
INFO[0013] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.1" to reach 'Succeeded' phase
43-
INFO[0013] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.1" to appear
44-
INFO[0019] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Succeeded
37+
INFO[0006] Creating a File-Based Catalog of the bundle "quay.io/demo/memcached-operator:v0.0.1"
38+
INFO[0008] Generated a valid File-Based Catalog
39+
INFO[0012] Created registry pod: quay-io-demo-memcached-operator-v1-0-1
40+
INFO[0012] Created CatalogSource: memcached-operator-catalog
41+
INFO[0012] OperatorGroup "operator-sdk-og" created
42+
INFO[0012] Created Subscription: memcached-operator-v0-0-1-sub
43+
INFO[0015] Approved InstallPlan install-h9666 for the Subscription: memcached-operator-v0-0-1-sub
44+
INFO[0015] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.1" to reach 'Succeeded' phase
45+
INFO[0015] Waiting for ClusterServiceVersion ""my-project/memcached-operator.v0.0.1" to appear
46+
INFO[0026] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Pending
47+
INFO[0028] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Installing
48+
INFO[0059] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.1" phase: Succeeded
49+
INFO[0059] OLM has successfully installed "memcached-operator.v0.0.1"
4550
----
4651

4752
. Upgrade the installed Operator by specifying the bundle image for the later Operator version:
@@ -56,14 +61,16 @@ $ operator-sdk run bundle-upgrade <registry>/<user>/memcached-operator:v0.0.2
5661
----
5762
INFO[0002] Found existing subscription with name memcached-operator-v0-0-1-sub and namespace my-project
5863
INFO[0002] Found existing catalog source with name memcached-operator-catalog and namespace my-project
59-
INFO[0009] Successfully created registry pod: quay-io-demo-memcached-operator-v0-0-2
64+
INFO[0008] Generated a valid Upgraded File-Based Catalog
65+
INFO[0009] Created registry pod: quay-io-demo-memcached-operator-v0-0-2
6066
INFO[0009] Updated catalog source memcached-operator-catalog with address and annotations
6167
INFO[0010] Deleted previous registry pod with name "quay-io-demo-memcached-operator-v0-0-1"
6268
INFO[0041] Approved InstallPlan install-gvcjh for the Subscription: memcached-operator-v0-0-1-sub
6369
INFO[0042] Waiting for ClusterServiceVersion "my-project/memcached-operator.v0.0.2" to reach 'Succeeded' phase
64-
INFO[0042] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: InstallReady
65-
INFO[0043] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Installing
66-
INFO[0044] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Succeeded
70+
INFO[0019] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Pending
71+
INFO[0042] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: InstallReady
72+
INFO[0043] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Installing
73+
INFO[0044] Found ClusterServiceVersion "my-project/memcached-operator.v0.0.2" phase: Succeeded
6774
INFO[0044] Successfully upgraded to "memcached-operator.v0.0.2"
6875
----
6976

modules/osdk-deploy-olm.adoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,29 @@ $ operator-sdk olm status \
4343
--olm-namespace=openshift-operator-lifecycle-manager
4444
----
4545

46-
. Run the Operator on your cluster by using the OLM integration in Operator SDK:
46+
. Enter the following command to run the Operator on the cluster:
4747
+
4848
[source,terminal]
4949
----
50-
$ operator-sdk run bundle \
51-
[-n <namespace>] \//<1>
52-
<registry>/<user>/<bundle_image_name>:<tag>
50+
$ operator-sdk run bundle \//<1>
51+
-n <namespace> \//<2>
52+
<registry>/<user>/<bundle_image_name>:<tag> <3>
5353
----
54-
<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.
54+
<1> The `run bundle` command creates a valid file-based catalog and installs the Operator bundle on your cluster using OLM.
55+
<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.
56+
<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.
57+
+
58+
[IMPORTANT]
59+
====
60+
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.
61+
====
5562
+
5663
This command performs the following actions:
5764
+
5865
--
5966
* 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.
6067
* Create a catalog source that points to your new index image, which enables OperatorHub to discover your Operator.
61-
* Deploy your Operator to your cluster by creating an `OperatorGroup`, `Subscription`, `InstallPlan`, and all other required objects, including RBAC.
68+
* Deploy your Operator to your cluster by creating an `OperatorGroup`, `Subscription`, `InstallPlan`, and all other required resources, including RBAC.
6269
--
6370

6471
ifeval::["{context}" == "osdk-golang-tutorial"]

operators/operator_sdk/osdk-working-bundle-images.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ You can use the Operator SDK to package, deploy, and upgrade Operators in the bu
1010

1111
include::modules/osdk-bundle-operator.adoc[leveloffset=+1]
1212
include::modules/osdk-deploy-olm.adoc[leveloffset=+1]
13+
14+
[role="_additional-resources"]
15+
.Additional resources
16+
17+
* xref:../../operators/understanding/olm-packaging-format.adoc#olm-file-based-catalogs_olm-packaging-format[File-based catalogs] in Operator Framework packaging format
18+
* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-managing-custom-catalogs-fb[File-based catalogs] in Managing custom catalogs
19+
* xref:../../operators/understanding/olm-packaging-format.adoc#olm-bundle-format_olm-packaging-format[Bundle format]
20+
1321
include::modules/osdk-publish-catalog.adoc[leveloffset=+1]
1422

1523
[role="_additional-resources"]

0 commit comments

Comments
 (0)