You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to use config map to override some configs in my spring app. When I keep all the configurations in application.yml file the context gets reloaded and the values in the kubernetes config-map replaces the default config values in application.yml.
However, I would like to have different config-maps for different environments like test and prod. But it looks like org.springframework.cloud.kubernetes.commons.config.reload.ConfigReloadUtil does not use the spring.cloud.kubernetes.config.name or spring.cloud.kubernetes.config.sources[].name from environment specific yml files. When I remove the config.name from application.yml and add the same (and/or config.sources[].name) to environment specific yml file like below, the ConfigReloadUtil does not detect the changes in the config map.
Describe the bug
I am trying to use config map to override some configs in my spring app. When I keep all the configurations in
application.yml
file the context gets reloaded and the values in the kubernetes config-map replaces the default config values inapplication.yml
.bootstrap.yaml
application.yml
The logs below confirm that the above configuration is correct.
However, I would like to have different config-maps for different environments like
test
andprod
. But it looks likeorg.springframework.cloud.kubernetes.commons.config.reload.ConfigReloadUtil
does not use thespring.cloud.kubernetes.config.name
orspring.cloud.kubernetes.config.sources[].name
from environment specific yml files. When I remove theconfig.name
fromapplication.yml
and add the same (and/orconfig.sources[].name
) to environment specific yml file like below, theConfigReloadUtil
does not detect the changes in the config map.application-dev.yml
Below log shows the context is not getting reloaded but I have updated the config map.
Could someone please help me fix this issue?
Environment:
Sample
Link to sample app: https://gitlab.com/baji/spring-configmap-example
The text was updated successfully, but these errors were encountered: