evanshortiss opened a new issue #1715: URL: https://github.com/apache/camel-k/issues/1715
Hi, I'm working on a route where I use a JDBC connector to perform a DB INSERT. I'd like to inject the db connection details from an existing secret and load via `System.getenv("DB_PASS"')`. To configure the datasource I have the following: ```java @BindToRegistry("dataSource") public BasicDataSource datasoure() { BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName("org.postgresql.Driver"); dataSource.setUrl("jdbc:postgresql://postgres:5432/my-db"); dataSource.setUsername("user"); // want to store these in a secret dataSource.setPassword("pass"); // want to store these in a secret return dataSource; } ``` With this my `.to("jdbc:datasource")` line is working, but the username and password are plaintext. I could use `kamel --env` to inject this, but I don't see how `--env` can reference a key in a secret. Is this possible? Perhaps there's a way to set this in the `application.properties` that I am missing? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org