You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing SME review comments
Fixing QE review comments
Fixing peer review comments
updates to add Anchoring IDs in module files and for Additional resources titles in assembly
Copy file name to clipboardExpand all lines: modules/sbo-categories-of-exposable-binding-data.adoc
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ The {servicebinding-title} enables you to expose the binding data values from th
11
11
12
12
This section provides examples to show how you can use the various categories of exposable binding data. You must modify these examples to suit your work environment and requirements.
== Exposing an entire config map or secret that is referenced from a resource
50
50
The following examples show how to expose an entire secret through annotations:
51
51
@@ -88,7 +88,7 @@ This example uses the `path` attribute with a `urn:alm:descriptor:io.kubernetes:
88
88
89
89
If you intend to project all the values from a `ConfigMap` service resource, you must specify it as an attribute in the backing service CR. For example, if the attribute is part of the `.spec` section, you can create and use a `specDescriptors` array. Or, if the attribute is part of the `.status` section, you can create and use a `statusDescriptors` array.
The following example shows how to expose a resource definition value through annotations:
139
139
@@ -164,7 +164,7 @@ The previous example uses the `connectionURL` attribute that points to the requi
164
164
165
165
If required values are available as attributes of backing service resources, annotating these values using `X-Descriptors` identifies them as the binding data.
Copy file name to clipboardExpand all lines: modules/sbo-methods-of-exposing-binding-data.adoc
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ You must expose the binding data from the backing service. Depending on your wor
26
26
** Declaring binding data through Operator Lifecycle Manager (OLM) descriptors
27
27
** Detection of binding data through owned resources
28
28
29
+
[id="provisioned-service_{context}"]
29
30
== Provisioned service
30
31
Provisioned service represents a backing service CR with a reference to a `Secret` resource placed in the `.status.binding.name` field of the backing service CR.
31
32
@@ -109,7 +110,7 @@ spec:
109
110
110
111
This method exposes all the keys in the `hippo-pguser-hippo` referenced `Secret` resource as binding data that is to be projected into the workload.
111
112
112
-
113
+
[id="direct-secret-reference_{context}"]
113
114
== Direct secret reference
114
115
You can use this method, if all the required binding data values are available in a `Secret` resource that you can reference in your Service Binding definition. In this method, a `ServiceBinding` resource directly references a `Secret` resource to connect to a service. All the keys in the `Secret` resource are exposed as binding data.
== Declaring binding data through CRD or CR annotations
148
150
You can use this method to annotate the resources of the backing service to expose the binding data with specific annotations. Adding annotations under the `metadata` section alters the CRs and CRDs of the backing services. {servicebinding-title} detects the annotations added to the CRs and CRDs and then creates a `Secret` resource with the values extracted based on the annotations.
You can use this method if your backing service is provided by an Operator. If your Operator is distributed as an OLM bundle, you can add OLM descriptors to describe the binding data that is to be exposed. The OLM descriptors are part of Cluster Service Version resources. The {servicebinding-title} detects the OLM descriptors and then creates a `Secret` resource with the values extracted based on the detected OLM descriptors.
209
211
@@ -240,6 +242,7 @@ The following examples show how to define an X-Descriptor depending on the resou
240
242
* The absence of the `Secret` or `ConfigMap` specific X-Descriptors indicates that the descriptor is referencing the binding data value at the given path.
== Detection of binding data through owned resources
244
247
You can use this method if your backing service owns one or more Kubernetes resources such as route, service, config map, or secret that you can use to detect the binding data. In this method, the {servicebinding-title} detects the binding data from resources owned by the backing service CR.
You can have optional fields in the annotations. For example, a path to the credentials might not be present if the service endpoint does not require authentication. In such cases, a field might not exist in the target path of the annotations. As a result, {servicebinding-title} generates an error, by default.
10
+
11
+
As a service provider, to indicate whether you require annotations mapping, you can set a value for the `optional` flag in your annotations when enabling services. {servicebinding-title} provides annotations mapping only if the target path is available. When the target path is not available, the {servicebinding-title} skips the optional mapping and continues with the projection of the existing mappings without throwing any errors.
12
+
13
+
.Procedure
14
+
15
+
* To make a field in the annotations optional, set the `optional` flag value to `true`:
* If you set the `optional` flag value to `false` and the {servicebinding-title} is unable to find the target path, the Operator fails the annotations mapping.
33
+
* If the `optional` flag has no value set, the {servicebinding-title} considers the value as `false` by default and fails the annotations mapping.
0 commit comments