camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Camel-K initContainer

Open milank78git opened this issue 2 years ago • 3 comments

Please help me. I need to add an initContainer during the build that pull password from external systems. Example I have service with ldap setting where ldap password pull from another system

milank78git avatar Jul 19 '22 10:07 milank78git

If I'm not mistaken, it's not possible right now. It sounds like a good enhancement candidate for the container trait though: https://camel.apache.org/camel-k/next/traits/container.html

tadayosi avatar Jul 20 '22 04:07 tadayosi

Great. And in terms of time ?

milank78git avatar Jul 20 '22 10:07 milank78git

No plan yet. Contribution is always welcome.

tadayosi avatar Jul 21 '22 07:07 tadayosi

@milank78git I overlooked Pod trait. Can't this (i.e. pod template) be a solution to the problem? https://camel.apache.org/camel-k/1.10.x/traits/pod.html

tadayosi avatar Sep 27 '22 05:09 tadayosi

it is a possible temporary solution An init container is the one that starts and executes before other containers in the same Pod and creating secret resource . Pod trait (pod template) it runs continuously and uses k8s resources

milank78git avatar Oct 21 '22 08:10 milank78git

@milank78git it should already be possible to add init containers using the pod trait. You can add them in the PodSpec template provided with the --pod-template option of the kamel run command.

astefanutti avatar Oct 21 '22 09:10 astefanutti

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Jan 20 '23 00:01 github-actions[bot]

I've just tried but it seems we need to include at least one container when specifying the pod-template. I tried just including initContainers but no luck: Error: Integration.camel.apache.org "test" is invalid: spec.template.spec.containers: Required value

squakez avatar Feb 06 '23 08:02 squakez