Skip to content
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

allow linking using ServiceBinding without ServiceBindingOperator #4543

Closed
4 tasks
kadel opened this issue Mar 23, 2021 · 5 comments · Fixed by #4905
Closed
4 tasks

allow linking using ServiceBinding without ServiceBindingOperator #4543

kadel opened this issue Mar 23, 2021 · 5 comments · Fixed by #4905
Assignees
Labels
estimated-size/M (10-20) Rough sizing for Epics. About 1 sprint of work for one person kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks
Projects

Comments

@kadel
Copy link
Member

kadel commented Mar 23, 2021

Goal

For developer to be able to link components and applications without the service binding operator having to be installed (self-service)

Acceptance Criteria

  • odo link <service-name> should work without having Service Binding Operator installed
  • odo link <component-name> should work without having Service Binding Operator installed
  • odo unlink should work correctly with links that don't use Service Binding Operator
  • odo describe should work correctly (displaying links, evns etc...) with links that don't use Service Binding Operator

Dependencies

Need access to the service binding library in order for this work to begin.

JIRA Epic Tracking

ODO-59

@kadel kadel added this to the 2.2 (Planning) milestone Mar 23, 2021
@girishramnani girishramnani added the kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks label Mar 29, 2021
@kadel kadel added estimated-size/L (20-40) Rough sizing for Epics. About 2 sprints of work for a person. estimated-size/M (10-20) Rough sizing for Epics. About 1 sprint of work for one person and removed estimated-size/L (20-40) Rough sizing for Epics. About 2 sprints of work for a person. labels Apr 6, 2021
@kadel
Copy link
Member Author

kadel commented Apr 7, 2021

I've done a small POC based on the changes introduced in redhat-developer/service-binding-operator#919

Thanks to the changes in that PR it is possible to easily create binding without an operator.
https://github.com/kadel/odo/blob/f87c8aa3acc3908d093fa5ef8d3f57cd27036295/pkg/odo/cli/component/common_link.go#L322-L334

mgr, _ := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
	Scheme: runtime.NewScheme(),
})
out, _ := json.MarshalIndent(o.serviceBinding, " ", " ")
fmt.Printf("%s\n", string(out))
pipeline := builder.DefaultBuilder.WithContextProvider(context.Provider(o.KClient.DynamicClient, context.ResourceLookup(mgr.GetRESTMapper()))).Build()
repeat, err := pipeline.Process(o.serviceBinding)
// you can read secret name from the passed service binding... Status.Secret
// for unbind the passed service binding instance must have deletetion timestamp set
out2, _ := json.MarshalIndent(o.serviceBinding, " ", " ")
fmt.Printf("%s\n", string(out2))
fmt.Println(repeat)
fmt.Println(err)

@dharmit dharmit assigned kadel and feloy and unassigned kadel May 24, 2021
@dharmit dharmit added this to For Consideration in Sprint 202 via automation May 24, 2021
@dharmit dharmit added this to For Consideration in Sprint 203 via automation Jun 14, 2021
@dharmit dharmit assigned girishramnani and unassigned feloy Jun 14, 2021
@dharmit dharmit removed this from For Consideration in Sprint 202 Jun 16, 2021
@dharmit dharmit removed this from For Consideration in Sprint 203 Jun 17, 2021
@dharmit dharmit added this to For Consideration in Sprint 203 via automation Jun 17, 2021
@girishramnani
Copy link
Contributor

there is a complexity in writing tests ( we install SBO cluster wide so we cannot write test for testing this feature) so we would expose an env variable to skip the SBO's usage. maybe SKIP_SBO?

@girishramnani
Copy link
Contributor

We can skip SBO installation on minikube and so all tests would use this feature

@dharmit dharmit added this to For Consideration in Sprint 204 via automation Jul 5, 2021
@dharmit
Copy link
Member

dharmit commented Jul 7, 2021

  • When using the Operator, it provides more features than using it as library
  • Other tools can understand Service Binding resources
    • ODC understands and draws it on the UI.
  • SBO also provides auto update feature. When annotation of CRD changes, SBO automatically injects it into the Deployment
  • Without Operator, you wouldn't be creating a Binding resource on the cluster but injecting the env vars directly into the Deployment.
  • odo wants to do it without the Operator as well because installing Operator is admin task and would compel a user to install Operator first.

@dharmit dharmit moved this from For Consideration to To Do in Sprint 204 Jul 8, 2021
@dharmit dharmit removed this from For Consideration in Sprint 203 Jul 12, 2021
@dharmit dharmit moved this from To Do to In Progress in Sprint 204 Jul 26, 2021
@dharmit dharmit added this to For Consideration in Sprint 205 via automation Jul 26, 2021
@dharmit dharmit moved this from For Consideration to To Do in Sprint 205 Jul 26, 2021
@dharmit dharmit moved this from To Do to For Review in Sprint 205 Jul 29, 2021
@dharmit dharmit moved this from To Do to In Progress in Sprint 205 Jul 29, 2021
@dharmit dharmit removed this from In Progress in Sprint 204 Jul 29, 2021
@dharmit dharmit moved this from In Progress to For Review in Sprint 205 Aug 2, 2021
Sprint 205 automation moved this from For Review to Done Aug 2, 2021
@kadel
Copy link
Member Author

kadel commented Aug 3, 2021

This was solved only partially.
There is still one big problem #4965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimated-size/M (10-20) Rough sizing for Epics. About 1 sprint of work for one person kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks
Projects
No open projects
Sprint 205
  
Done
Development

Successfully merging a pull request may close this issue.

6 participants