Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KubernetesConfigurationClient respecting ConfigMap file name and environment #324

Open
Ksnz opened this issue Jul 16, 2021 · 1 comment
Open
Labels
status: awaiting feedback status: future consideration The issue will be considered at a future date status: next major version The issue will be considered for the next major version type: enhancement New feature or request

Comments

@Ksnz
Copy link
Contributor

Ksnz commented Jul 16, 2021

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 example

apiVersion: v1
kind: ConfigMap
data:
  application-debug.yml: |+

would work only in debug environment
Because in current version environment parameter in

public Publisher<PropertySource> getPropertySources(Environment environment)

of KubernetesConfigurationClient is not used at all.

I know it is breaking change, so it may be released with major version

@pgressa
Copy link
Contributor

pgressa commented Aug 23, 2021

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.

@pgressa pgressa added the status: next major version The issue will be considered for the next major version label Sep 21, 2021
@pgressa pgressa added the status: future consideration The issue will be considered at a future date label Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting feedback status: future consideration The issue will be considered at a future date status: next major version The issue will be considered for the next major version type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants