Skip to content

Conversation

@philippthun
Copy link
Member

@philippthun philippthun commented Oct 17, 2024

A short explanation of the proposed change:

This is implementing both options for file-based service bindings like described in https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0030-add-support-for-file-based-service-binding.md.

An explanation of the use cases your change solves

Links to any other associated PRs

#4235 needs to be merged first (app feature)

  • 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

@philippthun philippthun force-pushed the file-based-service-bindings branch from 26e6766 to 133a686 Compare October 17, 2024 15:15
@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
@philippthun philippthun force-pushed the file-based-service-bindings branch from 4879337 to 3592e9b Compare October 23, 2024 13:00
@philippthun philippthun force-pushed the file-based-service-bindings branch 2 times, most recently from d32cce4 to 15a8a9c Compare November 27, 2024 11:19
@philippthun philippthun force-pushed the file-based-service-bindings branch 3 times, most recently from 7501f93 to 763edab Compare December 3, 2024 10:55
@svkrieger svkrieger force-pushed the file-based-service-bindings branch 4 times, most recently from 6a62f80 to f24cda2 Compare March 3, 2025 15:34
@svkrieger svkrieger force-pushed the file-based-service-bindings branch from f24cda2 to 382cbab Compare March 6, 2025 14:38
@svkrieger svkrieger marked this pull request as ready for review March 10, 2025 09:37
@svkrieger svkrieger changed the title [RFC0030 - 3] File-based service bindings [RFC0030 - 4] File-based service bindings Mar 11, 2025
philippthun and others added 6 commits March 11, 2025 13:47
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.
- 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
@svkrieger svkrieger force-pushed the file-based-service-bindings branch from 382cbab to 86ea4ed Compare March 11, 2025 12:49
@svkrieger svkrieger merged commit eac345b into cloudfoundry:main Mar 13, 2025
8 checks passed
@svkrieger svkrieger deleted the file-based-service-bindings branch March 13, 2025 14:12
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Mar 13, 2025
Changes in cloud_controller_ng:

- [RFC0030 - 4] File-based service bindings
    PR: cloudfoundry/cloud_controller_ng#4026
    Author: Philipp Thun <philipp.thun@sap.com>
    Author: Sven Krieger <37476281+svkrieger@users.noreply.github.com>
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.

3 participants