-
Notifications
You must be signed in to change notification settings - Fork 89
Support creation of managed secret without associating it to a workload #350
Support creation of managed secret without associating it to a workload #350
Conversation
/assign @isutton |
Codecov Report
@@ Coverage Diff @@
## master #350 +/- ##
=========================================
Coverage ? 64.74%
=========================================
Files ? 21
Lines ? 1387
Branches ? 0
=========================================
Hits ? 898
Misses ? 364
Partials ? 125 Continue to review full report at Codecov.
|
I don't see code changes, only tests? |
@sbose78 All the 3 acceptance criteria is already supported. I wrote test to confirm the 3 acceptance criteria in the task:
|
Interesting, Thank you! |
.. but you would then get this
|
I tried making a PR to your branch but the history was a bit messed up ( my bad probably ), so created one against the main repo: I've tested #351, it works, but doesn't provide any feedback in the
Here's the only relevant commit there. |
"./pkg/apis/apps/v1alpha1.ApplicationSelector": schema_pkg_apis_apps_v1alpha1_ApplicationSelector(ref), | ||
"./pkg/apis/apps/v1alpha1.BackingServiceSelector": schema_pkg_apis_apps_v1alpha1_BackingServiceSelector(ref), | ||
"./pkg/apis/apps/v1alpha1.ServiceBindingRequest": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequest(ref), | ||
"./pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestSpec(ref), | ||
"./pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestStatus(ref), | ||
"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ApplicationSelector": schema_pkg_apis_apps_v1alpha1_ApplicationSelector(ref), | ||
"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.BackingServiceSelector": schema_pkg_apis_apps_v1alpha1_BackingServiceSelector(ref), | ||
"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequest": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequest(ref), | ||
"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestSpec(ref), | ||
"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestStatus(ref), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the first time I've seen this; why generated files are being generated differently between developers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because of operator-sdk versions? I'm using 0.5.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mine is different:
➜ service-binding-operator git:(generic) ✗ operator-sdk version
operator-sdk version: "v0.15.0-37-g0eac8a11", commit: "0eac8a1169dfc0a8918b9e41ada6278307a0852b", go version: "go1.13.6 linux/amd64"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You definitely got to update your operator-sdk CLI
:-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am on 0.15.2 and even for me these changes are happening
Shouldn't we leave those changes for another PR, since the implemented tests already seem to validate the initial assumption that it currently works? |
Sorry, which changes are you saying we should skip in this PR ? |
How's this going? @DhritiShikhar |
Related to the lack of feedback in the |
But the |
@Avni-Sharma addressed. Please review again f2c599a |
|
||
require.Equal(t, "BindingSuccess", sbrOutput3.Status.BindingStatus) | ||
require.Equal(t, corev1.ConditionTrue, sbrOutput3.Status.Conditions[0].Status) | ||
require.Equal(t, reconcilerName, sbrOutput3.Status.Secret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have sbrOutput3.Status.BindingData.Name
. Now that the bindingData can be either in a Secret or a ConfigMap according to #366 . Refer https://github.com/redhat-developer/service-binding-operator/pull/366/files#diff-14a37dadc390fc3ec23459efc088de8eR164-R180 cc @sbose78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but #366 is not merged yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can track this and send a new PR :)
/retest |
|
||
func TestReconcilerGenericBinding(t *testing.T) { | ||
ctx := context.TODO() | ||
backingServiceResourceRef := "test-using-volumes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not using volumes for this test case so we should rename "test-using-volumes"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 78118e8
/lgtm |
/approve |
[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 |
@sbose78 Can you merge this PR (if no more comments) ? |
/retest |
Could you share an example we've tested this with ? I'm getting the following:
|
The secret does get created though. |
@DhritiShikhar Please use the issue template to specify "How to test". We should not be replacing the template with the content of a linked issue. |
Task: https://issues.redhat.com/browse/APPSVC-9
Description
Add support for "generic binding".
"In the service catalog UX this meant I just want the information dumped into a Secret, and then I'll choose what to do with it after that. This is good for referencing the Secret from other things like Jobs, or a Tekton pipeline, where your controller may not be able to directly modify a pod spec.
The request for this is coming up in discussions about transitioning some IBM brokers off of service catalog to operators instead. I think the use case is valid so we should consider it."
Acceptance Criteria
ApplicationSelectors
is skipped, only the binding secret should be created with the name of the secret being dumped in the status for arbitrary consumption.ApplicationSelectors
section, then the controller should inject the previously created secret into the deployment/deploymentconfig.