You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/01/16 01:13:06 UTC
[GitHub] [camel-k] doru1004 opened a new pull request #1916: Environment variables evaluated only at integration runtime
doru1004 opened a new pull request #1916:
URL: https://github.com/apache/camel-k/pull/1916
<!-- Description -->
This patch adds a way to pass environment variables that only get resolved at integration runtime.
These values can be passed as modeline options in this way:
```
# camel-k: property=camel.component.kafka.brokers={{env:KAFKA_BROKERS}}
```
This allows images built locally with `local create` to be deployed in the cloud. If the image depends on any such environment variables, their value needs to be resolved in the deployment script. This ensures that the same modeline option that is provided locally works when run in the cloud environment.
Moreover it provides a safe way to pass sensitive properties such as web hooks. The value of `{{env:KAFKA_BROKERS}}` will only become available when the integrations is run.
This patch also adds an `--env` flag to `kamel local run`. The command to run an existing integration image which depends on delayed values like `{{env:KAFKA_BROKERS}}` must provide the env var value on the command line explicitly:
```
kamel local run --image <registry>/<image-name> --env KAFKA_BROKERS=localhost:9092
```
<!--
Enter your extended release note in the below block. If the PR requires
additional action from users switching to the new release, include the string
"action required". If no release note is required, write "NONE".
You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
the text is added to the right section of the release notes.
-->
**Release Note**
```release-note
NONE
```
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [camel-k] nicolaferraro merged pull request #1916: Environment variables evaluated only at integration runtime
Posted by GitBox <gi...@apache.org>.
nicolaferraro merged pull request #1916:
URL: https://github.com/apache/camel-k/pull/1916
----------------------------------------------------------------
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:
users@infra.apache.org