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

Additional way of configuration Keys and Ids. #39

Open
depohmel opened this issue Jul 3, 2018 · 2 comments
Open

Additional way of configuration Keys and Ids. #39

depohmel opened this issue Jul 3, 2018 · 2 comments

Comments

@depohmel
Copy link
Collaborator

depohmel commented Jul 3, 2018

The current implementation of ubbagent is requiring to provide a configuration via JSON config.

Unfortunately, marketplace-k8s-app-tools default deployer is providing encodedServiceAccountKey, consumerId etc as Kubernets secrets.
K8s secrets can be mounted into Pod as File or as ENV vars. To make consumers live easy, it would nice to have another way of providing encodedServiceAccountKey and Ids into ubbagent library.
Something Keys/Secrets files path or knows ENV vars.
Similar to https://github.com/golang/oauth2/blob/ef147856a6ddbb60760db74283d2424e98c87bff/google/default.go#L43

@jvolkman
Copy link
Contributor

jvolkman commented Jul 6, 2018

Thanks for the suggestion. If using the metering agent as a sidecar using the provided Dockerfile, you can specify the key as an ENV var and reference the variable by name in the config. You can see an example here: https://github.com/GoogleCloudPlatform/marketplace-k8s-app-example/pull/86/files

This is all handled by the docker/ubbagent-start script, though, so if you're not using that env var support doesn't exist.

Specifically for service account keys, I think it's reasonable to support loading from files. Should be a straightforward addition.

@depohmel
Copy link
Collaborator Author

@jvolkman, unfortunately, sidecar approach didn't work. I have to use SDK one.

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

No branches or pull requests

2 participants