-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug where binding data is expected to overwrite the related resource name #515
Fix bug where binding data is expected to overwrite the related resource name #515
Conversation
Could you outline the user-facing scenario with an example please? |
/retest |
/retest |
Could you update the description with an example of what's broken, that's being fixed? |
@sbose78 updated. |
/retest |
@isutton Is this an issue with consumption in custom environment variables? |
@isutton |
pkg/controller/servicebindingrequest/annotations/annotations.go
Outdated
Show resolved
Hide resolved
/retest |
… and handler not found This change modifies buildServiceContexts() to ignore certain errors likely to happen, such as an invalid annotation format has been fed or in the case the format is proper, whether there's a handler for the given annotation format.
/retest |
Scenarios where the SBR is created prior the application and/or service are not well supported yet. Currently annotations added to either service and application are used to correlate those resources, but those are added by the SBO when the SBR is reconciled; without this information currently it is not possible to correlate the resource to a SBR.
/test all |
@isutton |
/lgtm |
/hold |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DhritiShikhar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
Motivation
A bug has been introduced in #407, changing the existing behavior where the data collected from the resource indicated by the annotation (either a
corev1.ConfigMap
orcorev1.Secret
) should also replace the field indicating the resource name with the collected data.Let's take a look in the following example resource:
Before #407, when
status.secretName
was used in a custom environment variable template, it would contain the wholedata
section of the related Secret, as the following excerpt from #475:And after #407, the following results were obtained instead:
Closes #475
Changes
The contents of a related resource are collected, grouped and made available to the custom environment variable template engine; as an example, if the field path
.status.dbCredentials
represents a resource name, it is expected the related resource contents (more specifically the.data
field) to be available under the same.status.dbCredentials
path when composing a custom environment variable template in a Service Binding Request.Below there is an example of what the input object (the service resource that contains the reference to the related resource) and the output object (the resource that is available to the custom environment template context):
For further more details refer the CONTRIBUTING.md