-
Notifications
You must be signed in to change notification settings - Fork 91
Feedback: allowing customEnvVar to be defined per service in backingServiceSelectors #356
Comments
@navidsh We are going to support the following in the customEnvVar to let users compose environment variables from one or more backing services.
In other words,
|
Something like..
|
Thanks @sbose78! Just wanted to throw it out there, how about moving backingServiceSelectors:
- group: postgres.dev
kind: Service
resourceRef: user-db
version: v1beta1
- group: postgres.dev
kind: Credentials
resourceRef: admin-creds
version: v1beta1
customEnvVar:
- name: CONNECTION_URL
value: {{ .spec.username }} / {{ Service.user-db.status.url }} I agree that it looks clean to have a single |
thanks! @pedjak do you want to outline your suggestion here? |
I agree with @navidsh and feel that custEnvVar is kind of implementation(and an optional) detail and it would be better if it sits per backing service basis. So that the CR has the important aspects i.e the |
In this topic, if we move Example:
|
I'm good with the renaming. Avni, Navid, |
How about that we replace using .. pairs with a logical name (like var name) that can be associated to a resource within a ServiceBindingRequest instance. At the same we can collapse into
and then we can craft expressions like
In case that we have only one |
We were doing something similar but realized it was a non-standard kubernetes API and needed explicit parsing/deserialization compared to using https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionKind I really like the second part of your proposal @pedjak , how about designing the API like this:
|
@sbose78 fine, but in that case, I would rename
And since we are here: could we drop |
I like adding the |
|
+1 to the addition of Did we also agree on renaming |
I really like this, but doing this would break the UI and therefore it would take us longer to put the change in. |
why don't we have
It is quite common in the SQL world to refer to multiple tables all over the query, so was thinking why not here, the developers are already used to this kind of thinking. Also it solves the problem of identifying binding info. How do we identify which service the More context in here servicebinding/spec#41 (review) |
Current
ServiceBindingRequest
CRD doesn't allow users to definecustomEnvVar
per service in thebackingServiceSelectors
list. This limits users to define multiple backing services and usecustomEnvVar
to extract info from the backing services with the same GVK.SBR:
Backing service:
Users can create separate SBR for each backing service to get around this limitation.
The text was updated successfully, but these errors were encountered: