Skip to content

Commit 388ee2a

Browse files
authored
Merge pull request #25383 from pmacik/db-for-service-binding-catalog-source
Replace OperatorSource with CatalogSource for backing service in Service Binding
2 parents ac2218c + 778709d commit 388ee2a

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

modules/odc-connecting-components.adoc

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,36 +53,40 @@ Currently, a few specific Operators like the *etcd* and the *PostgresSQL Databas
5353

5454
You can establish a binding connection with Operator-backed components.
5555

56-
This procedure walks through an example of creating a binding connection between a PostgreSQL Database service and a Node.js application. To create a binding connection with a service that is backed by the PostgreSQL Database Operator, you must first add the Red Hat-provided PostgreSQL Database Operator to the OperatorHub using a backing Operator source, and then install the Operator.
56+
This procedure walks through an example of creating a binding connection between a PostgreSQL Database service and a Node.js application. To create a binding connection with a service that is backed by the PostgreSQL Database Operator, you must first add the Red Hat-provided PostgreSQL Database Operator to the *OperatorHub* using a `CatalogSource` resource, and then install the Operator.
57+
The PostreSQL Database Operator then creates and manages the `Database` resource, which exposes the binding information in secrets, config maps, status, and spec attributes.
5758

5859
.Prerequisite
5960
* Ensure that you have created and deployed a Node.js application using the *Developer* perspective.
6061
* Ensure that you have installed the *Service Binding Operator* from OperatorHub.
6162

6263
.Procedure
63-
. Create a backing Operator source that adds the PostgresSQL Operator provided by Red Hat to the OperatorHub. A backing Operator source exposes the binding information in secrets, config maps, status, and spec attributes.
64-
.. In the *Add* view, click the *YAML* option to see the *Import YAML* screen.
65-
.. Add the following YAML file to apply the Operator source:
64+
. Create a `CatalogSource` resource that adds the PostgresSQL Database Operator provided by Red Hat to the *OperatorHub*.
65+
.. In the *+Add* view, click the *YAML* option to see the *Import YAML* screen.
66+
.. Add the following YAML file to apply the `CatalogSource` resource:
6667
+
6768
[source,yaml]
6869
----
69-
apiVersion: operators.coreos.com/v1
70-
kind: OperatorSource
70+
apiVersion: operators.coreos.com/v1alpha1
71+
kind: CatalogSource
7172
metadata:
72-
name: db-operators
73-
namespace: openshift-marketplace
73+
name: sample-db-operators
74+
namespace: openshift-marketplace
7475
spec:
75-
type: appregistry
76-
endpoint: https://quay.io/cnr
77-
registryNamespace: pmacik
76+
sourceType: grpc
77+
image: quay.io/redhat-developer/sample-db-operators-olm:v1
78+
displayName: Sample DB OLM registry
79+
updateStrategy:
80+
registryPoll:
81+
interval: 30m
7882
----
79-
.. Click *Create* to create the Operator source in your cluster.
80-
. Install the Red Hat-provided PostgreSQL Database Operator:
83+
.. Click *Create* to create the `CatalogSource` resource in your cluster.
84+
. Install the Red Hat-provided *PostgreSQL Database* Operator:
8185
.. In the *Administrator* perspective of the console, navigate to *Operators -> OperatorHub*.
8286
.. In the *Database* category, select the *PostgreSQL Database* Operator and install it.
8387
. Create a database (DB) instance for the application:
84-
.. Switch to the *Developer* perspective and ensure that you are in the appropriate project.
85-
.. In the *Add* view, click the *YAML* option to see the *Import YAML* screen.
88+
.. Switch to the *Developer* perspective and ensure that you are in the appropriate project, for example, `test-project`.
89+
.. In the *+Add* view, click the *YAML* option to see the *Import YAML* screen.
8690
.. Add the service instance YAML in the editor and click *Create* to deploy the service. Following is an example of what the service YAML will look like:
8791
+
8892
[source,YAML]
@@ -91,7 +95,6 @@ apiVersion: postgresql.baiju.dev/v1alpha1
9195
kind: Database
9296
metadata:
9397
name: db-demo
94-
namespace: test-project
9598
spec:
9699
image: docker.io/postgres
97100
imageName: postgres

0 commit comments

Comments
 (0)