Skip to content

Service Binding for operator-backed services#12

Open
sbose78 wants to merge 15 commits into
operator-framework:masterfrom
sbose78:sbo
Open

Service Binding for operator-backed services#12
sbose78 wants to merge 15 commits into
operator-framework:masterfrom
sbose78:sbo

Conversation

@sbose78

@sbose78 sbose78 commented Mar 19, 2020

Copy link
Copy Markdown
  • Add details about existing work
  • Advanced configuration
  • Bill of materials
  • Permissions
  • Migration strategy: Bringing a non Operator Framework project into Operator Framework
  • Roadmap

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2020
@sbose78

sbose78 commented Mar 24, 2020

Copy link
Copy Markdown
Author

@dmesser @ecordell I've made some progress with the proposal with 20% remaining, do you mind taking a look and helping me with early feedback if the format and content of the proposal makes sense? Let me know if there's something explicitly I should be adding.

CC @siamaksade

@dmesser

dmesser commented Mar 30, 2020

Copy link
Copy Markdown

@sbose78 Thank you. Can you add some information about the following:

  • the "bill of materials" for the service binding operator itself
  • how the process of Service Binding factors in RBAC

@sbose78

sbose78 commented Apr 7, 2020

Copy link
Copy Markdown
Author

Thank you. I am working to define a specification as well ( early stage, needs work ) along with a plan for the first wave of adopters . I'll update this with the new information!

@sbose78

sbose78 commented May 7, 2020

Copy link
Copy Markdown
Author

We made agreements on what the specification could look like https://github.com/application-stacks/service-binding-specification and stabilized it for the time being.

Based on the conversations, I will be updating the proposal and taking it to completion.

@sbose78 sbose78 changed the title WIP - Service Binding for operator-backed services Service Binding for operator-backed services May 8, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 8, 2020
@sbose78

sbose78 commented May 8, 2020

Copy link
Copy Markdown
Author

Removed WIP, there are a few additions I'll make along the way, however it is ready for a detailed review now.

Comment thread enhancements/service-binding.md Outdated
### Custom Environment variables


To make binding applications (e.g., legacy Java applications that depend on JDBC connectioon strings) together with backing services more flexible, the Service Binding Operator supports the optional use of custom environment variables. To use custom environment variables, an application developer creates a ServiceBindingRequest that looks like the one shown

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServiceBinding instead of ServiceBindingRequest

Comment thread enhancements/service-binding.md Outdated
operator's OLM (Operator Lifecycle Manager) descriptor. The Service Binding
Operator extracts to bind the application together with the backing service.
The information may be specified in the "status" and/or "spec" section of the
OLM in plaintext or as a reference to a secret.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secret or configmap resource

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread enhancements/service-binding.md Outdated
kind: Database
resourceRef: db-demo

customEnvVar:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be renamed to dataMapping as well? refer https://issues.redhat.com/browse/APPSVC-538

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks!

@dmesser dmesser left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbose78 Thanks for the update. I think we still need a section that discusses the security model of this Operator. How do avoid that a user that normally doesn't have the privileges to read bindable fields can misuse the Service Binding Operator to get those injected into a resource they have access to?

@sbose78

sbose78 commented May 20, 2020

Copy link
Copy Markdown
Author

How do avoid that a user that normally doesn't have the privileges to read bindable fields can misuse the Service Binding Operator to get those injected into a resource they have access to?

I'll add the section, thank you @dmesser !

We'll be doing Subject Access Review checks using a validating webhook - it isn't supported yet, but we have an epic on our backlog https://issues.redhat.com/browse/APPSVC-546

If there's anything that needs to be prioritized to ensure the transition is smooth, we shall prioritize.

@shawn-hurley

Copy link
Copy Markdown
Member

Do we want this apart of the default OLM install for upstream install of OLM?

@sbose78

sbose78 commented Jun 15, 2020

Copy link
Copy Markdown
Author

Do we want this apart of the default OLM install for upstream install of OLM?

@dmesser @siamaksade I'll need you to weigh in on this.

Comment thread enhancements/service-binding.md Outdated
wildcardPolicy: None
```

A detailed guide to decorating backing services to make them binding friendly has been documented [here](https://github.com/application-stacks/service-binding-specification/blob/master/annotations.md).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has moved, and will be updated.

Comment thread enhancements/service-binding.md Outdated
To make binding applications (e.g., legacy Java applications that depend on JDBC connectioon strings) together with backing services more flexible, the Service Binding Operator supports the optional use of custom environment variables. To use custom environment variables, an application developer creates a ServiceBinding that looks like the one shown

```yaml
apiVersion: service.binding/v1alpha1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using operators.coreos.com at the moment.

@baijum

baijum commented Oct 29, 2020

Copy link
Copy Markdown

Thank you. I am working to define a specification as well ( early stage, needs work ) along with a plan for the first wave of adopters . I'll update this with the new information!

The specification @sbose78 mentioned has moved here: https://github.com/k8s-service-bindings/spec
Also, Red Hat's Service Binding Operator is no more conforming to the spec. Current the only spec-compliant implementation is from VMWare: https://github.com/vmware-labs/service-bindings
I have a side project which is aiming for core-spec compliance with few extensions: https://github.com/kubepreset/kubepreset (demo)

@baijum

baijum commented Jan 12, 2021

Copy link
Copy Markdown

I have a side project which is aiming for core-spec compliance with few extensions: https://github.com/kubepreset/kubepreset (demo)

Update: I stopped working on my side-project for now.

The spec is now part of a Kubernetes SIG:
kubernetes-retired/service-catalog#2857


The Service Binding Controller enables applications to use external services by automatically collecting and sharing binding information (credentials, connection details, volume mounts, secrets, etc.) with the application. In effect, the Service Binding Operator defines a contract between a “bindable” backing service (for example, a database operator) and an application requiring that backing service.

Note that in addition to the initial sharing of binding information, the binding is also “managed” by the Service Binding Operator. This statement means that, if credentials or URLs undergo modification by the backing service operator, those changes are automatically reflected in the application.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we concluded that this should/would be managed by the Service Binding Operator or should be part of OLM? (or enabled by default with OLM?)

Or is the discussion on how it is included in a different enhancement/discussion?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proposal intends to make a pitch to move Service Binding into the OperatorFramework umbrella. Shipping it with OLM is a related conversation.

@bparees

bparees commented Feb 3, 2021

Copy link
Copy Markdown
Contributor

@sbose78 i am struggling to understand what this is proposing, vs what exists already in SBO + OLM.

It talks about several different apis/annotations for specifying bindings, some generic and some specific to operators. Can you rework this to make it clearer which part is "background info" about how things work today, and which parts are the actual proposed enhancements?

It would also help if it was clearer whether this is proposing changes just in OLM, changes just in SBO, or both.

@sbose78

sbose78 commented Feb 3, 2021

Copy link
Copy Markdown
Author

Yes, this enhancement proposal needs some maintenance since this was a while ago. I'm on it!

@sbose78

sbose78 commented Mar 3, 2021

Copy link
Copy Markdown
Author

@bparees I've updated the proposal to reflect the current state of SBO accurately.

@bparees bparees left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm still a bit confused as to why this is an operator-framework EP.

Comment thread enhancements/service-binding.md Outdated

The backing service may provide binding information as
* Metadata in the CRD as annotations
* Metadata in the OLM bunde manifest file as Descriptors

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this referring to the CSV? (also typo on bundle)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

status: proposed
---

# Service Binding for operator-backed services

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very little of this seems specific to operators. it's generically about binding for a variety of resource types.

  1. how much of this represents capabilities the SBO already has?
  2. what does it really have to do with OLM? (at a minimum i'd expect to see examples/discussion of how operators expose bindable information, or bind to information, using the CSV metadata mechanism).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how much of this represents capabilities the SBO already has?

All of it

what does it really have to do with OLM? (at a minimum i'd expect to see examples/discussion of how operators expose bindable information, or bind to information, using the CSV metadata mechanism).

Yes, CSV descriptors are an option. I wanted to cast a wider net with Operators/CRDs in this proposal. Let me add in the pieces for CSV too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of it

so what is the enhancement that is being proposed? this reads more like (possibly sorely needed) product docs. Or preamble/background leading up to a proposal but not actually making one.

@sbose78 sbose78 Mar 3, 2021

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what is the enhancement that is being proposed?

A proposal to enhance the Service Binding Operator would be made to the Service Binding Operator project.

This proposal describes what the Service Binding Operator is, with the ultimate goal of making it an Operator Framework project ( ie, a part of it). The latter is what I'm really proposing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proposal describes what the Service Binding Operator is, with the ultimate goal of making it an Operator Framework project ( ie, a part of it). The latter is what I'm really proposing.

ok, can you clarify what that would mean? (lift+shift the operator into the operator-framework github org? deprecate the standalone operator and embed the binding logic/behavior into OLM itself? something else?) That seems like the critical piece of the proposal. (But the background is very helpful)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants