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

Provide for special property values for retrieving configuration #5690

Open
corneil opened this issue Feb 21, 2024 · 0 comments
Open

Provide for special property values for retrieving configuration #5690

corneil opened this issue Feb 21, 2024 · 0 comments

Comments

@corneil
Copy link
Contributor

corneil commented Feb 21, 2024

Problem description:
It is not advisable to store secrets in a simple relational database where it can be easily retrieved.

Solution description:
Spring Cloud Data Flow and Skipper need to be able to retrieve secrets and configuration values from more than one location depending on deployment configuration. As an example you can have Kubernetes Secrets or ConfigMaps accessible in the namespace where SCDF is deployed and you can have a Spring Cloud Config Server.
The user should be able to provide a spel expression that is evaluated to retrieve the relevant value for a property or environmental variable.

In the case of providing a value to an environmental variable and the deployment is on Kubernetes it is possible to reference secrets value by name and key.
The Spel expression need to provide unambiguous information on which method to use and what to retrieve.

We need to decide how Dataflow is going to choose to evaluate the Spel expression and not passed to the application as the value of the property/environmental variable. A suggestion is that those be surrounded by ' or prefixed with a \

Options to consider:
property=#{System.env['ENV_VAR_NAME']}
property=#{k8s.secrets['SECRET_NAME']}
property=#{k8s.secrets['SECRET_NAME'].key}
property=#{config.property.name}
property=#{config['application'].property.name}

Dataflow will use Environment or a specific PropertyResolver to retrieve the relevant property value.

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

1 participant