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

Support Kubernetes ConfigMap and Secrets as configuration/value sources #6745

Closed
maxandersen opened this issue Jan 23, 2020 · 8 comments · Fixed by #8376
Closed

Support Kubernetes ConfigMap and Secrets as configuration/value sources #6745

maxandersen opened this issue Jan 23, 2020 · 8 comments · Fixed by #8376
Labels
Milestone

Comments

@maxandersen
Copy link
Contributor

Description
Is #305 (comment) about mapping config map to a "magic destination" what we expect users to do for kubernetes deployments ?

Would it be better that quarkus-kubernetes extension or maybe a separate quarkus-kubernetes-config extension would have a configuration source that could be added in with a fairly high precedence order by default.

And then kubernetes-secrets would be available somehow to resolve values in any config source ?

@maxandersen
Copy link
Contributor Author

approaches being discussed for this at smallrye/smallrye-config#215

@gastaldi
Copy link
Contributor

gastaldi commented Jan 23, 2020

From the mailing list, it would be nice to have a configuration source that

a) use token at /var/run/secrets/kubernetes.io/serviceaccount/token
b) use namespace from /var/run/secrets/kubernetes.io/serviceaccount/namespace
c) read all config-maps by default, possibly use labels to filter them.

@geoand
Copy link
Contributor

geoand commented Jan 23, 2020

approaches being discussed for this at smallrye/smallrye-config#215

This solution, when implemented, which be about much more than Kubernetes ConfigMaps. It will just make ConfigMaps retrieval very easy and completely integrated with the rest of the Quarkus way of doing things

@kenfinnigan
Copy link
Member

If this results in not actually needing a ConfigSource that reads Kube ConfigMap, or reads anything else, that's fine, we just need to know so we don't expend effort in SmallRye if it isn't needed.

@radcortez, do you have any thoughts on this?

@radcortez
Copy link
Member

The discussion around smallrye/smallrye-config#215 is more related to Quarkus than SmallRye. I believe we don't need anything in SmallRye to support what Quarkus is doing, but please let us know if we are missing something.

@geoand
Copy link
Contributor

geoand commented Apr 2, 2020

This should now be fairly easy to implement because we have the notion of a bootstrap configuration (see https://github.com/quarkusio/quarkus/blob/master/extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/SpringCloudConfigClientRecorder.java#L19).
Perhaps I'll take this up soon on some spare time.

@geoand
Copy link
Contributor

geoand commented Apr 2, 2020

I'll hopefully try and get a first version of this for 1.4

@geoand
Copy link
Contributor

geoand commented Apr 6, 2020

#8376 contains an implementation of this

geoand added a commit that referenced this issue Apr 6, 2020
Support Kubernetes ConfigMap and Secrets as configuration/value sources
@gsmet gsmet added this to the 1.4.0 milestone Apr 7, 2020
viniciusfcf pushed a commit to viniciusfcf/quarkus-fork that referenced this issue Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants