I have to inject DB URL, DB Username and Password variables into a Java Spring Boot Application. I know that these properties reside in the application.properties file under res/ folder.
Now as a design change I want to adopt K8s ConfigMaps and Secrets to be used in place of hardcoding in the the application.properties file.
How can I link the CMs and Secrets from K8s to the application. How should I set placeholders in application.properties file?
Does defining the CM and Secret dependency in application deployment.yaml does everything?