k0pper commented on issue #549:
URL: https://github.com/apache/camel-kamelets/issues/549#issuecomment-947564041


   @nicolaferraro This is an even better solution. This way I can configure 
every sink and source separately. For instance when I have a telegram sink 
**and** source that need to be connected.
   
   Just to bundle the solution into one reply, how to use auto-secrets in 
KamelBindings:
   1. create a secret using this property file
   ```
   kubectl create secret generic telegram-secret 
--from-literal=authorizationKey=myauthkey 
--from-literal=chatId=myChatId<secretKey>
   ```
   
   2. link the kamelet that needs the secret to the secret (--overwrite if 
secret already exists)
   ```
   kubectl label secret telegram-secret 
camel.apache.org/kamelet=my-telegram-sink 
camel.apache.org/kamelet.configuration=telegram-secret --overwrite
   ```
   
   3. use it like @nicolaferraro suggested:
    
   > ```yaml
   > # ...
   >   sink:
   >     ref:
   >       kind: Kamelet
   >       apiVersion: camel.apache.org/v1alpha1
   >       name: my-company-log-sink
   >     properties:
   >       id: telegram-secret # The special "id" property links the binding to 
the secret you defined above
   > ```
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to