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

Merged
merged 3 commits into from
Aug 22, 2019
Merged

Service Bindings #22

merged 3 commits into from
Aug 22, 2019

Conversation

nebhale
Copy link
Contributor

@nebhale nebhale commented Aug 6, 2019

A proposal for concretely defining how Service Binding information is exposed to buildpacks and applications.

@nebhale
Copy link
Contributor Author

nebhale commented Aug 6, 2019

Summoning @markfisher and @scothis for their insights into Kubernetes idioms.

@scothis
Copy link

scothis commented Aug 7, 2019

Kubernetes secrets can be mounted as a single directory, with each key in the secret representing a file in that directory. Having the metadata for a single service be split between directories will make it harder to mange.

Likewise, structuring the service binding based on an attribute of the binding, other than name, will make it harder to manage as the tool creating the file system would need deep knowledge of the service.

I'd favor a form that puts all of the content for a single service into a single directory, and devolves the service.toml into individual files in that directory:

 platform
 └── services
     ├── primary-db
     │   ├── endpoint
     │   ├── kind
     │   ├── password
     │   ├── provider
     │   ├── tags
     │   └── username
     └── secondary-db
         ├── endpoint
         ├── kind
         ├── password
         ├── provider
         ├── tags
         └── username

@nebhale
Copy link
Contributor Author

nebhale commented Aug 15, 2019

@scothis The problem I see with that design (versus the service.toml metadata sitting next to the credentials) is that now tags, provider, kind, etc. all have to be keys within the secret rather than attributes (I might have the terminology wrong) on the resource itself. Combine that with the fact that it's important to have the values of the metadata at build time and ideally not have the values of the secrets then, I think there's an argument for keeping the metadata out of the secret payload.

@nebhale
Copy link
Contributor Author

nebhale commented Aug 15, 2019

@scothis Based on discussion in the WG meeting today, there was a preference for the metadata in files, but in a separate directory next to the secrets. Does this compromise work for you?

@nebhale
Copy link
Contributor Author

nebhale commented Aug 15, 2019

Another concern was raised privately via the Heroku team

the inconsistency between the proposed use cases stands out and if we decide to include service_kind and providers namespaces all services should follow this format with default namespaces for those without kind or provider attributes.

The kind/provider division was inspired by Crossplane and serves as a mechanism for describing an abstract service type (e.g. MySQL, Redis) and a concrete implementation (e.g. CloudDB, Redis To Go). I believe that all services, even the more esoteric ones, can be represented with the kind/provider division. To take a couple of examples from the Heroku Add-ons catalog (kind/provider):

  • MySQL/JawsDB MySQL
  • MySQL/JawsDB Maria
  • MySQL/ClearDB
  • Redis/Redis To Go
  • Redis/Redis Cloud
  • Redis/Redis Green
  • Redis/Heroku
  • Redis/OpenRedis

Now those are the easy ones, multiple providers for an obvious single service kind. But you could imagine something where there is a more 1:1 mapping like APMs. In that case, most of the time you might want only a single kind/provider pair, but you might also want (as in the CF case) for a user to be able to manually create a service binding

  • New Relic/New Relic
  • New Relic/User Provided
  • AppDynamics/AppDynamics SaaS
  • AppDynamics/AppDynamics On Prem
  • AppDynamics/User Provided

Finally, it'd be totally OK to have a kind that is hyper-specific to a single vendor:

  • QRackajack/QRackajack
  • Semaphore/Semaphore
  • User Agent Identifier/User Agent Identifier

In short, I think it's totally OK to have a single kind/provider pair (with identical values for both) for some services as it leaves us the flexibility to have multiple providers per kind in other places.

This change is the first pass at a proposal for concretely defining how Service Binding information is exposed to buildpacks and applications.

Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the RFC to focus on a metadata directory instead of the
previous options.

Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the directory structure to fully encapsulate both the
metadata and secret associated with a given service rather than have them as
peers to one another.

Signed-off-by: Ben Hale <bhale@pivotal.io>
@nebhale nebhale closed this in 65a225b Aug 22, 2019
@nebhale nebhale merged commit 9f470a6 into master Aug 22, 2019
@nebhale nebhale deleted the service-binding branch August 22, 2019 17:27
nebhale added a commit to buildpacks/spec that referenced this pull request Sep 3, 2019
This change adds the Service Binding extension specification as proposed in
RFC #12.

[buildpacks/rfcs#22]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit to buildpacks/spec that referenced this pull request Oct 21, 2019
This change adds the Service Binding extension specification as proposed in
RFC #12.

[buildpacks/rfcs#22]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit to buildpacks/spec that referenced this pull request Oct 23, 2019
This change adds the Service Binding extension specification as proposed in
RFC #12.

[buildpacks/rfcs#22]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit to buildpacks/spec that referenced this pull request Oct 23, 2019
This change adds the Service Binding extension specification as proposed in
RFC #12.

[buildpacks/rfcs#22]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit to buildpacks/spec that referenced this pull request Nov 5, 2019
This change adds the Service Binding extension specification as proposed in
RFC #12.

[buildpacks/rfcs#22]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit to buildpacks/spec that referenced this pull request Nov 8, 2019
This change adds the Binding extension specification as proposed in RFC #12.

[resolves #12][buildpacks/rfcs#22]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit that referenced this pull request Jan 29, 2020
[resolves #34]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit that referenced this pull request Jan 29, 2020
[resolves #34]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit that referenced this pull request Jan 29, 2020
[resolves #34]

Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit that referenced this pull request Jan 29, 2020
[resolves #35]

Signed-off-by: Ben Hale <bhale@pivotal.io>
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.

5 participants