Skip to content

Commit 894bfb3

Browse files
committed
Add additional option for service bindings to CNB RFC
1 parent 5a7ebf4 commit 894bfb3

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

toc/rfc/rfc-draft-add-cnbs.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,39 @@ in how service bindings are consumed by buildpacks. The v3 buildpacks expect
139139
service bindings to follow the [Kubernetes Service Binding specification](https://github.com/servicebinding/spec),
140140
which places service binding credentials on the filesystem. Cloud Foundry and
141141
v2 buildpacks instead use environment variables for service binding
142-
credentials.
142+
credentials. The majority of the v2 and v3 buildpacks do not consume service
143+
bindings, so solving this problem will not block execution for most buildpacks.
144+
145+
At time of writing, there are two viable solutions to integrate the Paketo
146+
buildpacks with CF Deployment: emulating Kubernetes Service Bindings in Diego
147+
or updating the Paketo buildpacks to consume Cloud Foundry environment
148+
variables.
149+
150+
#### Emulating Kubernetes Service Bindings
143151

144152
In order to securely place credentials on the filesystem, Diego will need the
145153
ability to mount in-memory filesystems (e.g. `tmpfs`) in application
146154
containers. Once an in-memory filesystem is available, select `VCAP_SERVICES`
147155
environment variables can be translated into their Kubernetes Service Binding
148-
equivalents by the shim orchestrator, for consumption by the v3 buildpacks.
156+
equivalents by the shim orchestrator, for consumption by the Paketo buildpacks.
157+
158+
#### Paketo Buildpacks Consume Environment Variables
159+
160+
There is work in progress for v3 buldpacks using the libcnb package to read
161+
Cloud Foundry environment variables in addition to Kubernetes Service Bindings
162+
(see [buildpacks/libcnb#227](https://github.com/buildpacks/libcnb/pull/227)).
163+
Outside of the Java buildpacks, the Paketo buildpacks do not currently use
164+
libcnb, so the remaining Paketo buildpacks that consume envionrment variables
165+
will need to be updated to use libcnb or add equivalent logic. If the Paketo
166+
buildpacks are updated, then no changes will be needed to the core Cloud
167+
Foundry runtime.
168+
169+
#### Recommendation
170+
171+
Updating the Paketo buildpacks to consume Cloud Foundry environment variables
172+
appears to be the easier option. However, given that there are at least two
173+
viable options for buildpack service binding consumption, this RFC proposes
174+
making the final decision at implementation time.
149175

150176
### Governance and Release
151177

0 commit comments

Comments
 (0)