-
Notifications
You must be signed in to change notification settings - Fork 344
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
Kamelets load properties from ConfigMap #3811
Comments
I am not sure to understand the problem. Would you like to "attach" a configmap to a Kamelet directly? The Kamelet are thought to be used by Camel framework even outside the Kubernetes world, if that is what is asked here. |
Consider the following simple custom kamelet definition (my own written kamelet):
the {{key.value}} in the beans definition section is being defined as a property key in a configMap that is running in the same namespace on the cluster (GKE). This throws an exception when deploying the kamelet, because {{key.value}} is not defined/visible for the kamelet. My question (I think, it's rather an issue) is there way to let a kamelet to load properties defined in a specific configMap? Or can a specific configMap get loaded/mounted in the kamelet definition? Thank you |
I think you should make your Kamelet definition agnostic of the place where it will run and the way those parameters are injected. Ideally that |
Thank you @squakez for your reply. Indeed. It works fine if I bind the value in a KameletBinding or in an Integration and inject it to the Kamelet. I was looking for a way to bind system or global variables that can be directly injected to the Kamelet during kamelet deployment independently, because such global variables should not be injected by dedicated Integrations that use the Kamelet. |
I don't think the scenario you are outlining is something that is really feasible as a kamelet is a template so every property needed by a kamelet must be provided in the form on a parameter, otherwise properties gets shared across all kamelets instance. In your case you can define the |
Thank you @lburgazzoli for your comment. |
Kamelets can only access ConfigMaps & Secrets properties, if the they get loaded/mounted via the Integration that uses/calls the kamelet. There is no way for a kamelet to load/mount ConfigMaps and Secrets independent from the called integration.
The text was updated successfully, but these errors were encountered: