orange-cloudfoundry / static-creds-broker

A CloudFoundry service broker to ease exposition of static credentials
Apache License 2.0
7 stars 1 forks source link

support application.yaml deployment through env vars #48

Closed gberche-orange closed 7 years ago

gberche-orange commented 7 years ago

The application.yml deployment procedure at https://github.com/orange-cloudfoundry/static-creds-broker/blob/master/use_yaml_config.md requires to unzip the application prior to the push.

This step is not yet supported as part of https://github.com/orange-cloudfoundry/terraform-provider-cloudfoundry/#applications making it hard to use the yml config, and requiring to fall back on the flat environment variable config style.

/cc @ArthurHlt

Instead, it would be interesting to prototype with injecting the content of the application.yml into an environment variable, and have this env file being written into an application.yml through a .profile script embedded into the static-cred release jar.

See https://discuss.pivotal.io/hc/en-us/articles/221429687 and https://docs.cloudfoundry.org/devguide/deploy-apps/deploy-app.html for related documentation.

s-bortolussi commented 7 years ago

Using such a hook does not seem to be encouraged . Moreover, by default spring boot maven plugin will repackage jar in a way that makes any source file under src/main/resources/.profile file not available from jar root path (.profile file is put under BOOT-INF/classes).