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

[Feature]: App Developer can see Service Credential Bindings projected onto running workloads via VCAP_SERVICES #462

Closed
tcdowney opened this issue Jan 13, 2022 · 1 comment · Fixed by #562
Assignees
Labels

Comments

@tcdowney
Copy link
Member

tcdowney commented Jan 13, 2022

Blockers/Dependencies

No response

Background

As an App Developer
I want Credentials from Service Bindings for User-provided Service Instances to be accessible via the VCAP_SERVICES environment variable
So that my existing CF apps that are VCAP_SERVICES aware can continue to work


Acceptance Criteria

GIVEN I have multiple CFServiceBindings bindings bound to an app
WHEN I inspect the running Pods for that app
THEN I see that there is a VCAP_SERVICES environment variable with its value set to a json string containing credentials/info about each binding.

For example, in CF today you'd see something like this after cf ssh-ing on to an app:

vcap@ea6b07a8-bb91-4b16-43d3-9b4e:~$ env | grep VCAP_SERVICES -A 18
VCAP_SERVICES={"user-provided":[{
  "label": "user-provided",
  "name": "test-upsi",
  "tags": [

  ],
  "instance_guid": "f4a3a20f-8fd5-4233-afd3-cfcd863986e1",
  "instance_name": "test-upsi",
  "binding_guid": "13bbc5ee-14a5-400b-a354-a68dd52a1807",
  "binding_name": null,
  "credentials": {
    "user-provided-key-1": "user-provided-value-1",
    "user-provided-key-2": "user-provided-value-2"
  },
  "syslog_drain_url": null,
  "volume_mounts": [

  ]
}]}

Dev Notes

  • "name" is an optional field for bindings. When "name" is empty/missing it should be set to be the same name as the Service Instance in VCAP_SERVICES
  • In the exploration/spike we found that the the ProcessController was the best place to do this

Resources:

@tcdowney tcdowney added the UPSI label Jan 13, 2022
gnovv added a commit that referenced this issue Jan 26, 2022
[issue #462]

Co-authored-by: Matt Royal <[email protected]>
gnovv added a commit that referenced this issue Jan 26, 2022
[issue #462]

Co-authored-by: Matt Royal <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
[issue #462]

Co-authored-by: Matt Royal <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
matt-royal added a commit that referenced this issue Jan 27, 2022
[Issues #462]

Co-authored-by: Matt Royal <[email protected]>
Co-authored-by: Akira Wong <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
Also cleanup and standardize test phrasing and whitespace

[Issue #462]

Authored-by: Matt Royal <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
[issue #462]

Co-authored-by: Matt Royal <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
matt-royal added a commit that referenced this issue Jan 27, 2022
[Issues #462]

Co-authored-by: Matt Royal <[email protected]>
Co-authored-by: Akira Wong <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
Also cleanup and standardize test phrasing and whitespace

[Issue #462]

Authored-by: Matt Royal <[email protected]>
matt-royal added a commit that referenced this issue Jan 27, 2022
Add VCAP_SERVICES env vars to LRPs
@krnbr
Copy link

krnbr commented Dec 13, 2023

Sorry to piggy back this issue,

Can someone please share the details, how to make credhub avaiable as a service in the korifi? How to brokerize it?

@matt-royal, @gnovv! if you can help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants