-
Story
-
Resolution: Done
-
Major
-
None
Goal
Support a re-defined annotations' format for operator/service authors to define what is "interesting" for applications to bind.
- Support a scalable format for operator/backing service authors to decorate CRDs/CRs/Kubernetes objects
- Validate and implement https://github.com/application-stacks/service-binding-specification/blob/master/annotations.md
- Support "simple" binding annotations.
A CRD or a CR or a resource having binding annotations directly referring to "elementType=string" should be bindable end-to-end. Note, when the "elementType" is not specified in an annotation, it must default to "string".
Sample scenarios
- Use a specific key in configmap or secret as volume mount
“servicebinding.dev/host”: "path={.status.data.dbConfiguration},objectType=ConfigMap,bindAs=volume,elementType=string,sourceKey=myhost
- Use a specific key in configmap or secret as volume mount without explicit specification of elementType=string. elementType should default to string, hence
“servicebinding.dev/host”: "path={.status.data.dbConfiguration},objectType=ConfigMap,bindAs=volume,sourceKey=myhost
- Use an entire configmap or secret as environment variables
“servicebinding.dev/doesntmatter”: "path={.status.data.dbConfiguration},objectType=ConfigMap,bindAs=envVar
Note, bindAs should default to "envVar" & `elementType` should default to `string`. It may or may not be specified in the annotation, example
“servicebinding.dev/host”: "path={.status.data.dbConfiguration},objectType=ConfigMap,sourceKey=myhost
Acceptance Criteria
1. A CRD or a CR/resource having binding annotations directly referring to "elementType=string" should be bindable end-to-end.
2. Guidance in the annotations associated with use of envVar or volume mount should be taken into account.
3. Guidance in the annotations associated with use of specific "source" keys in the configmap/secret should be taken into account.
4. Use suggested destination binding secret key “servicebinding.dev/host” while building the binding secret.
5. Global or service-specific environment variable prefix needs to be taken into account.
6. Global or service-specific volume mount prefix needs to be taken into account.
Notes:
What is simple binding metadata ?
If the binding metadata being referred to is a string, then it's called "simple".
apiVersion: apps.kube.io/v1beta1 kind: Database metadata: name: my-cluster spec: ... status: data: url: db.stage.ibm.com credentials: my-creds-secret
Here, the value of "status.data.url" & ""status.data.my-creds-secret" is a string, and thereby being referred to as "simple" metadata
What is complex binding metadata ?
If the binding metadata being referred to is a slice or slice of maps, then it's called "complex".
Associated epic: https://issues.redhat.com/browse/APPSVC-528
- incorporates
-
APPSVC-529 Parse binding annotations/descriptors of elementType=sliceOfMaps
-
- Closed
-
-
APPSVC-681 Implement or extend existing acceptance test to cover binding information via annotations on CRD
-
- Closed
-
-
APPSVC-530 Parse binding annotations/descriptors of elementType=slices
-
- Closed
-