service-binding-operator icon indicating copy to clipboard operation
service-binding-operator copied to clipboard

Drop Support binding N services to M application using single ServiceBinding resource

Open jasperchui opened this issue 4 years ago • 2 comments

Use Case:

ServiceBinding resource allows declaring multiple services and multiple application.

Reasons:

Although this looks at first as a handy shortcut, using this might cause a few issues:

A binding item from one service can be shadowed by another from another service (when binding keys are the same). Likelihood is very high, given that expected key names are username/password/url/… The issue can be worked around by introducing binding key prefixes or some custom naming conventions so that the keys become unique, but then it might be that such bindings cannot be consumed by application, i.e. it needs to be modified to support that Unbind operation becomes all or nothing, i.e. it is not possible to unbind single service What about updating/editing impact? I want to edit one service’s binding resources, how does it impact the applications that are consuming it?

Requirements:

Check the status with documentation Check the status and alignment with existing sample code

jasperchui avatar Mar 04 '21 15:03 jasperchui

@jasperchui We do not support binding to M applications through a single ServiceBinding CR.

DhritiShikhar avatar Apr 27 '21 06:04 DhritiShikhar

Let's pause on this because there is an open issues at spec about adding support for so called ComposedServices. The current ability in our API allows exactly that. Furthermore, we have seen that Crunchy Postgres operator creates additional secret that is not referred by DB resources and only way at the moment to bind to such database (without patching the operator) is to specify both resources.

Edit(@baijum): Fix link

pedjak avatar Jul 14 '21 10:07 pedjak

This is still possible via annotations & label selectors, which is the intended behavior.

sadlerap avatar Sep 22 '22 12:09 sadlerap