Open Ksnz opened 3 years ago
Hi @Ksnz ! Interesting idea though I wonder what would be the use case apart dynamically creating CM with the debug environment (if the application was started with debug env). The environments are deduced on the ApplicationContext startup and rest of the beans are configured based on property sources loaded from the configuration file. Also the configuration files are part of the application bundle, on the opposite the ConfigMap resource is provided externally so it's rather configuration discovery.
Truth is the AWS parameter store module follows the pattern you are suggesting.
At this moment I do not have strong opinion on this I'm curious what other users are thinking about this feature.
In current version of micronaut-kubernetes name of file in ConfigMap has no any effect on application. I think it would be better if it works like configs in application resources with same naming rules:
application-<env>
for examplewould work only in
debug
environment Because in current versionenvironment
parameter inof
KubernetesConfigurationClient
is not used at all.I know it is breaking change, so it may be released with major version