-
Story
-
Resolution: Obsolete
-
Undefined
-
None
-
None
Details:
Spec says:
The Secret data MUST contain a type entry with a value that identifies the abstract classification of the binding. The Secret type (.type verses .data.type) MUST reflect this value as service.binding/{type}, replacing {type} with the Secret data type. It is RECOMMENDED that the Secret data also contain a provider entry with a value that identifies the provider of the binding. The Secret data MAY contain any other entry.
apiVersion: v1 kind: Secret metadata: name: binding-secret type: service.binding/mysql data: type: mysql
[1] The service should expose `type` and `provider` key and value.
[2] The binding secret should set:
- `.type` as `service.binding/<type_key_value>`
- `.data.type` as `<type_key_value>`
- `.data.provider` as <provider_key_value>
[3] If the `ServiceBinding` CR contains `.type` or `.provider` field, then binding secret will consider the value coming in from the `ServiceBinding` CR.
Are dependencies identified?
**No dependencies.
Are blockers noted?
No blockers.
What is the expected delivery timeline?
GA
Is design implementable?
1. Add two fields in `ServiceBinding` API -> `type` and `provider`
2. Once the `ServiceBinding` is created, add a check in the reconciler loop, if `.type` or `.provider` field is set, copy that in the binding secret.
3. If `ServiceBinding` does not contain `.type` and `.provider`, then check for the `.type` and `.provider` in the service credentials.
4. If service credentials contains `.type` and `.provider`, then copy that in the binding secret.
What is the acceptance criteria?
Scenario: Binding secret contains `.type` and `.provider` key provided by `ServiceBinding` CR
Given The Custom Resource is present
"""
apiVersion: "stable.example.com/v1"
kind: Backend
metadata:
name: backend
spec:
"""
* Generic test application "foo" is running
When Service Binding is applied
"""
apiVersion: binding.operators.coreos.com/v1alpha1
kind: ServiceBinding
metadata:
name: sb-1
spec:
type: database-connection
provider: bitnami
application:
name: foo
group: apps
version: v1
resource: deployments
services:
- group: stable.example.com
version: v1
kind: Backend
name: backend
"""
* Service Binding "sb-1" is ready
* And The application env var "type" has value "database-connection"
* And The application env var "provider" has value "bitnami"
Is the story (roughly) estimated?
5