Miaoxiang-philips opened a new issue, #5178:
URL: https://github.com/apache/camel-k/issues/5178

   ### What happened?
   
   Hi Team
   In our Kubernetes cluster, we already have a Secret to store the database 
Host, USERNAME, PASSWORD, etc. For security reasons, we don't want to store 
sensitive information like the database password in the properties file of the 
Git Repo
   
   So we specify our template with 'kamel run 
--build-property=file:quarkus.properties --property file:datasource.properties 
xxx.java --dev --pod-template pod-template.yaml' :
   ```yaml
   containers:
     - name: integration
       envFrom:
         - secretRef:
           name: ui-postgresql
   ```
   datasource.properties:
   
![image](https://github.com/apache/camel-k/assets/116536125/273030db-4f70-426f-affe-e7bb4aa2ab98)
   
   After running in our pod, I through the exec `env | grep PASSWORD` way to 
query the environment variables, ensure the environment variable exists in the 
pod, but our program error, said an error connecting to the database PASSWORD 
cannot be empty, So I continue to troubleshoot the 
`/etc/camel/conf.d/user.properties` The properties file:
   
![image](https://github.com/apache/camel-k/assets/116536125/c25b80d4-a76d-4fd7-8441-2e267db38a07)
   
   As you can see, we got an empty value. We also tried `${PASSWORD: "Test"}` 
to try to specify a default value, but we still couldn't get the `PASSWORD` 
value, and the result was Test
   We also tried changing the Key to `DB_PASS` to prevent a collision, but 
still no luck
   
   ### Steps to reproduce
   
   _No response_
   
   ### Relevant log output
   
   _No response_
   
   ### Camel K version
   
   1.11.1


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to