-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Explore]: Spike out User Provided Service Instances Support Using Kubernetes Service Bindings for Runtime #367
Comments
@julian-hj and I investigated the Kubernetes service binding spec using a concrete implementation here - https://github.com/vmware-labs/service-bindings. We were able to bind a service to an app (pushed using Secret
Service Binding
|
Various work items for an initial implementation of the API Shim
CFServiceInstance controller
CFProcess controller
|
Notes from pairing Jan-5-2022 with @akrishna90
@tcdowney PTAL, and let us know if you think this story can be considered "Done". |
Thanks @akrishna90 and @julian-hj for the detailed write up! I've synthesized some of your findings under the "Design Details" section of the Proposal we've been working on. |
Given some feedback from the proposal, we now think it's valuable to have an abstraction on top of the K8s
An updated diagram is attached below: We also sketched out various options on this Miro: |
Closing this exploration. Feature development is well underway. |
Background
Developers using CF can bind their apps to two types of services: user provided and managed. Managed Services on CF are those whose lifecycle and credentials are controlled by a separate service broker. Cloud Foundry interfaces with these brokers via the Open Service Broker API and exposes them to developers through its Service Marketplace. Developers can ask brokers to create new Service Instances for them and then bind their apps (via a Service Binding) to these instances. As part of that binding, the broker will supply credentials and other important information (such as connection strings, certs, port numbers, etc.) to the app via the
VCAP_SERVICES
environment variable.User Provided Services are managed directly by CF users. Users can create what are known as “User Provided Service Instances” (UPSIs) with an arbitrary set of configuration. When a Service Binding is created to one of these UPSIs, the configuration is shared with the bound app under the same
VCAP_SERVICES
environment variable. For example, a developer may be given credentials to an already existing database instance and use a UPSI to expose it to their app running on TAS.As a MVP, we are looking to support basic (just credentials -- no route services, no syslog drains) User Provided Service Instances first before moving on to exploring the more complicated world of managed services.
There are existing projects in the Kubernetes ecosystem such as the Kubernetes Service Bindings Specification that provide custom resources and "duck types" (
ProvisionedService
) that we believe we can leverage to achieve our immediate compatibility goals while providing flexibility for the evolving services landscape in the Kubernetes community.Acceptance Criteria
We want to explore how we might implement support for User Provided Service Instances in CF on K8s.
As part of this exploration let's spike out an implementation using a new
CFServiceInstance
CR that implements theProvisionedService
duck type from the K8s Service Binding Spec as well as theServiceBinding
custom resource.Example
CFServiceInstance
At a minimum we want credentials from multiple bindings to be aggregated under a
VCAP_SERVICES
env var so that existing CF apps can continue to work. This looks something like this in a CF for VMs app runtime and staging containers:We should also explore what it looks like to actually implement the Kubernetes Service Bindings spec and project these credentials as volumes on the app container. See the Workload Projection portion of the specification for more details on what that looks like.
Questions to answer
CFProcess
reconciler?Pods
?VCAP_SERVICES
? How do we make them volume mounts?cf create-user-provided-service
,cf bind-service
,cf services
,cf update-user-provided-service
,cf unbind-service
, etc.TODO write a separate story for staging:
CFBuild
reconciler?Pods
?VCAP_SERVICES
for staging or do CNBs not even look at that.Output
A proposal to share with the CF on K8s SIG group about how we're going to tackle this.
Number of days this exploration is expected to take. This is what is “pointed”.
3
Dev Notes
Resources:
The text was updated successfully, but these errors were encountered: