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

Service Binding for operator-backed services #12

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

sbose78
Copy link

@sbose78 sbose78 commented Mar 19, 2020

  • 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
Copy link
Author

sbose78 commented Mar 24, 2020

@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
Copy link

dmesser commented Mar 30, 2020

@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
Copy link
Author

sbose78 commented Apr 7, 2020

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
Copy link
Author

sbose78 commented May 7, 2020

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
Copy link
Author

sbose78 commented May 8, 2020

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

### 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

Choose a reason for hiding this comment

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

ServiceBinding instead of ServiceBindingRequest

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.

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
Author

Choose a reason for hiding this comment

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

Done, thanks!

kind: Database
resourceRef: db-demo

customEnvVar:

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
Author

Choose a reason for hiding this comment

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

done, thanks!

Copy link

@dmesser dmesser left a comment

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
Copy link
Author

sbose78 commented May 20, 2020

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
Member

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

@sbose78
Copy link
Author

sbose78 commented Jun 15, 2020

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.

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
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.

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
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
Copy link

baijum commented Oct 29, 2020

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
Copy link

baijum commented Jan 12, 2021

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.

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
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
Copy link
Contributor

bparees commented Feb 3, 2021

@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
Copy link
Author

sbose78 commented Feb 3, 2021

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

@sbose78
Copy link
Author

sbose78 commented Mar 3, 2021

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

Copy link
Contributor

@bparees bparees left a comment

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.


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
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
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
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
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
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.

Copy link
Author

@sbose78 sbose78 Mar 3, 2021

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
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