-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 #8376
Conversation
…pplication starts
...runtime/src/main/java/io/quarkus/kubernetes/client/runtime/KubernetesConfigSourceConfig.java
Outdated
Show resolved
Hide resolved
IMHO, this totally needs to be a separate extension. Also, I'm leaving for your consideration whether this should or shouldn't be part of SmallRye Config. For example, here's a PR that adds a Kubernetes config source in SRye Config: smallrye/smallrye-config#238 Except it's a fancy filesystem config source :-/ This one is what I'd expect from a Kubernetes config source. |
We can certainly start out having this here and move the core parts into the SmallryeConfig if that makes sense. |
i agree with @Ladicek ,that should be a separate extension (like the config YAML extension). Preferably having SM Config support should be the first step (to avoid API inconsistencies, etc) |
I don't think that SR Config support should be a prerequisite for this, but a useful future avenue to explore. |
I moved the code into its own extension. Also, I think that item no.2 can be addressed later on if people request it, while I would like to do the documentation in a subsequent PR. |
Don't be lazy, documentation is as important as tests 😛 😁 |
Sure, but I don't want the PR to be help up by typos or my very frequent habit of forgetting to type words as I think about that I need to write 😂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config source stuff looks OK to me, I don't know anything about the Kubernetes part though. It might be a good idea to explain (in the commit message) why (if I understand correctly) the "volume" approach which io.smallrye.config.source.file.FileSystemConfigSource
exploits was not chosen.
@dmlloyd the idea is to provide users the ability to read So it's basically complementary to what users can already do with regular config sources. |
A follow-up for @iocanel: When this extension is active, generate the proper |
@maxandersen any comments on this? |
discussed here https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/k8s.20config/near/193046063 but in short: looks good, its default off which is good as its set to also fails if config/secrets not reachable. I haven't tried to run it in practice (had build issues today ;/ ) but looking at code and expected semantics looks good imo. |
Thanks for checking @maxandersen. I'll write some documentation within the week. @iocanel mind looking at the |
Still to do:
Fixes: #6745