apache / camel-k

Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
https://camel.apache.org/camel-k
Apache License 2.0
848 stars 345 forks source link

Enhance environment trait to include values from secrets/configmaps #5522

Open squakez opened 1 month ago

squakez commented 1 month ago

We can enhance the trait to include values taken directly from secret without the need to expose them or to mount as files via mount trait. For example we should have something like kamel run test.yaml -t env.vars=MY_VAR=secret:my-secret/my-value converted in a Pod like:

apiVersion: v1
kind: Pod
...
spec:
  containers:
...
    env:
    - name: MY_VAR
      valueFrom:
        secretKeyRef:
          name: my-secret
          key: my-value
tdiesler commented 3 weeks ago

sign me on

tdiesler commented 3 weeks ago

PR: https://github.com/apache/camel-k/pull/5639