generated from camel.apache.org/kamelet
Update Untime secret configuration
parent
b20e7bbb7a
commit
fc239cf34a
@ -12,7 +12,8 @@ As an example, let’s create a Configmap named my-cm containing certain informa
|
||||
`kubectl create configmap my-cm --from-literal=my-configmap-key="configmap content"`
|
||||
We want to use the materialized file in an integration:
|
||||
|
||||
```config-configmap-route.yaml
|
||||
```
|
||||
config-configmap-route.yaml
|
||||
- from:
|
||||
uri: "timer:configmap"
|
||||
steps:
|
||||
@ -20,10 +21,13 @@ We want to use the materialized file in an integration:
|
||||
simple: "resource:classpath:my-configmap-key"
|
||||
- setBody:
|
||||
simple: "configmap content is: ${body}"
|
||||
- to: "log:info"```
|
||||
- to: "log:info"
|
||||
|
||||
```
|
||||
|
||||
You can see that we’re expecting to use a my-configmap-key file stored somewhere in the classpath. In order to materialize the Configmap will be as easy as running the --config configmap syntax:
|
||||
|
||||
kamel run --config configmap:my-cm config-configmap-route.yaml
|
||||
kamel run `)`
|
||||
As soon as the Integration starts, the Camel K operator will take care to mount a volume with the Configmap 's content.
|
||||
|
||||
you can provide a Configmap which is not yet available on the cluster. The Integration won’t start until the resource will be made available.
|
||||
@ -35,7 +39,8 @@ As an example, let’s create a Secret named my-sec containing certain informati
|
||||
kubectl create secret generic my-sec --from-literal=my-secret-key="very top secret"
|
||||
We want to use the materialized secret file in an integration:
|
||||
|
||||
```config-secret-route.yaml
|
||||
```
|
||||
config-secret-route.yaml
|
||||
- from:
|
||||
uri: "timer:secret"
|
||||
steps:
|
||||
@ -43,5 +48,7 @@ We want to use the materialized secret file in an integration:
|
||||
simple: "resource:classpath:my-secret-key"
|
||||
- setBody:
|
||||
simple: "secret content is: ${body}"
|
||||
- to: "log:info"```
|
||||
- to: "log:info"
|
||||
|
||||
```
|
||||
You can see that we’re expecting to use a my-secret-key file stored somewhere in the classpath. In order to materialize the Secret will be as easy as running the --config secret syntax:
|
||||
Loading…
Reference in New Issue
Block a user