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

[RFC0030 - 3] File-based service bindings #4026

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

philippthun
Copy link
Member

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

  • A short explanation of the proposed change:

  • An explanation of the use cases your change solves

  • Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

When the app feature 'file-based service bindings' is enabled,
SERVICE_BINDING_ROOT is returned instead of VCAP_SERVICES.

For an app using file-based service bindings the '/env' endpoint (i.e.
GET /v3/apps/:guid/env) returns the following:

  {
    ...
    "system_env_json": {
      "SERVICE_BINDING_ROOT": "/etc/cf-service-bindings"
    },
    ...
  }

The file runtime_environment/system_env_presenter_spec.rb has been
deleted because all the tests it contained are also present in
system_environment/system_env_presenter_spec.rb.
@philippthun philippthun force-pushed the file-based-service-bindings branch 2 times, most recently from f0a3ac6 to 4879337 Compare October 18, 2024 12:40
@philippthun philippthun changed the title File based service bindings [RFC0030 - 3] File-based service bindings Oct 18, 2024
- validate binding names and (credential) keys
- check for duplicate binding names
- check the total bytesize, maximum allowed size is 1MB
- files are added in the following order:
   1. credential keys
   2. VCAP_SERVICES attributes
   3. 'type' and 'provider'
- in case a credential key equals a VCAP_SERVICES attributes or 'type'
  or 'provider', it will be overwritten
- for VCAP_SERVICES attribute names, underscores are replaced by hyphens
- file content is serialized as JSON (non-string objects)
- AppRecipeBuilder -> Diego::Bbs::Models::DesiredLRP
- TaskRecipeBuilder -> Diego::Bbs::Models::TaskDefinition
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.

1 participant