-
Notifications
You must be signed in to change notification settings - Fork 382
Generic Extensions #2785
Comments
IMO CRDs are rather used for the configuration and manifests about the expected cluster state (eventually consistent). CRDs are manifests and the controller should ensure that the described state is present in the cluster. I'm really not sure if it is a good idea to use CRDs just as a wrap layer for HTTP calls.
Before doing such thing IMO it will be good to ping the sig API machinery if the CRD can be used in that way if we will not be blocked in the future even more with other restrictions - not only size. So based on my concerns I think that maybe we can just create a small gateway (separate container) that will only add auth to the request and proxy it to the given broker? In that way, we will give end-user a similar approach both in K8s and CF and also user will be responsible to implement how to handle the HTTP calls (errors, retries, pagination etc) |
Thanks for the comment @mszostok. Yeah spending some more time playing around with some PoCs and reading your concerns I agree that CRDs to represent arbitrary Broker actions could lead to a whole world of trouble. I think option 4, I know @rsampaio has been thinking about this too, do you have any thoughts? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
/lifecycle frozen |
This project is being archived, closing open issues and PRs. |
Feature: Generic Extensions
The OSBAPI specification has a pending PR to support Generic Extensions.
I'm creating this issue to start a conversation on how this might be implemented in service-catalog and to get feedback on ideas.
Why
From the PR:
What is it
Service Brokers can provide OpenAPI documents attached to Plans in their Catalog. The extensions can then be triggered by platforms on defined paths on the Service Broker.
For example a Broker may host the following OpenAPI document to perform a backup:
And this can be triggered on the broker on a particular path:
/v2/service_instances/:instance_id/extensions/broker-extension-path/backup
.An example broker implementation can be found here.
The Problem
The problem can be broken down into two parts:
How does a consumer know that the service instance now supports a backup extension? What is the best mechanism for them to consume the information in the OpenAPI document.
How could service-catalog trigger the extension and return a response?
Notes
In CloudFoundry
For reference this is how we imagine it could be implemented in CF.
In CF when we read the catalog we can make the Broker's OpenAPI document available to the consumer via the CF API.
CF will then give the user an endpoint on the platform on which extensions can be triggered. E.g.
/v2/service_instances/:guid/extesions/*
In effect CF will act as a proxy to the Service Broker to trigger the extension.Thoughts for service-catalog
A challenge for service-catalog is that it cannot really act a proxy like CF, since it is based on CRDs and reconciliation.
For discoverability we see a few options:
ClusterServicePlan
resource and let users discover it via k8s resource.ServiceInstanceExtension
resource that belong to Service Instances.For Triggering the Extension:
ServiceInstanceExtensionRequest
. See something like this poc/backup/{id}
resource may have POST / GET / LIST / DELETE. Can we create a CR that you can manipulate via kubernetes that maps to the coresponding HTTP methods? e.g. Create CR -> POST, Delete CR -> DELETE.Questions
Sam & @teddyking
The text was updated successfully, but these errors were encountered: