This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 8918ccae6 fix(trait): doc to explain initContainers
8918ccae6 is described below

commit 8918ccae692d296e403021ced94c7257c35bef28
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Tue Dec 5 16:36:20 2023 +0100

    fix(trait): doc to explain initContainers
    
    Closes #3459
---
 docs/modules/traits/pages/pod.adoc | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/docs/modules/traits/pages/pod.adoc 
b/docs/modules/traits/pages/pod.adoc
index c81ff62ed..b2eec2362 100755
--- a/docs/modules/traits/pages/pod.adoc
+++ b/docs/modules/traits/pages/pod.adoc
@@ -46,7 +46,7 @@ The following configuration options are available:
 
 // End of autogenerated code - DO NOT EDIT! (configuration)
 
-== Example
+== Sidecar containers
 
 With the following Integration, that reads files from a directory:
 
@@ -98,3 +98,20 @@ Condition "Ready" is "True" for Integration integration
 [1] 2021-04-30 07:40:05,142 INFO  [route1] (Camel (camel-1) thread #0 - 
file:///var/log) Fri Apr 30 07:40:04 UTC 2021 Content from the sidecar container
 [1] :  hello from the template
 ----
+
+== Init containers
+
+With this trait you will be also able to run `initContainers`. There is a 
little caveat though, as you will need to include at least one container in the 
template spec, you will need to provide the configuration for the default 
container, which is `integration`. Here a simple example:
+
+.template.yaml
+[source,yaml]
+----
+containers:
+  - name: integration
+initContainers:
+  - name: init
+    image: busybox
+    command: [ "/bin/sh" , "-c", "echo 'hello'!" ]
+----
+
+The `integration` container will be overwritten by the container running the 
route, and the `initContainer` will run before the route as expected.
\ No newline at end of file

Reply via email to