mmelko commented on a change in pull request #1861:
URL: https://github.com/apache/camel-k/pull/1861#discussion_r625705337



##########
File path: docs/modules/traits/pages/pod.adoc
##########
@@ -0,0 +1,83 @@
+= Pod Trait
+
+// Start of autogenerated code - DO NOT EDIT! (description)
+   The pod trait allows the customization of the Integration pods.
+   It applies the `PodSpecTemplate` struct contained in the Integration 
`.spec.podTemplate` field, into the Integration deployment Pods template, using 
strategic merge patch.
+
+   This can be used to customize the container where Camel routes execute, by 
using the `integration` container name.
+
+
+This trait is available in the following profiles: **Kubernetes, Knative, 
OpenShift**.
+
+// End of autogenerated code - DO NOT EDIT! (description)
+== Example
+We have an integration that will read files from defined folder:
+[source,groovy]
+----
+from('file:///var/log')
+ .convertBodyTo(String.class)
+ .setBody().simple('${body}:  {{TEST_VARIABLE}} ')
+ .log('${body}')
+
+----
+The content of the folder might be autogenerated by bash script using a 
sidecar container. The pod template could be defined as follows:
+
+[source,yaml]
+----
+containers:
+  - name: integration

Review comment:
       1. TEST_VARIABLE=abc will be overwritten by values from the template, 
due to changes from the template are actually applied by pod trait in later 
stages. 
   2. I've tried to add there command from the example: `command: [ "/bin/sh" , 
"-c", "while true; do echo $(date -u) 'Content from the sidecar altered 
container' > /var/log/file.txt; sleep 1;done" ]` and nothing really happened. 
Command hasn't been overwritten due to `jvm` trait is executed after the `pod` 
trait. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to