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 2022/06/26 20:24:53 UTC

[GitHub] [camel-k] sidharthramesh opened a new issue, #3396: kamel run --output yaml does not include resources

sidharthramesh opened a new issue, #3396:
URL: https://github.com/apache/camel-k/issues/3396

   ## Steps to reproduce
   I'm trying to get the output of an Integration in YAML to be applied later via GitOps using ArgoCD.
   My Java file with modeline looks like this:
   ```java
   // camel-k: name=hl7-sink language=java resource=file:composition.jslt resource=file:patient.jslt property=file:application.properties dependency=mvn:org.apache.camel.quarkus:camel-quarkus-hl7 dependency=mvn:org.apache.camel.quarkus:camel-quarkus-base64
   
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.List;
   import java.util.Map;
   
   import org.apache.camel.AggregationStrategy;
   import org.apache.camel.Exchange;
   import org.apache.camel.builder.RouteBuilder;
   import ca.uhn.hl7v2.model.Message;
   import ca.uhn.hl7v2.util.Terser;
   
   public class Sink extends RouteBuilder {
     AggregationStrategy combinedData = (oldExchange, newExchange) -> {
       if (oldExchange != null) {
         HashMap<String, String> oldData = oldE...
   ...
   ```
   
   Running `kamel run Sink.java -o yaml` produces YAML:
   ```yaml
   apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
     annotations:
       networking.knative.dev/disable-auto-tls: "true"
     creationTimestamp: null
     name: hl7-sink
     namespace: default
   spec:
     dependencies:
     - mvn:org.apache.camel.quarkus:camel-quarkus-hl7
     - mvn:org.apache.camel.quarkus:camel-quarkus-base64
     sources:
     - content: |
         // camel-k: name=hl7-sink language=java resource=file:composition.jslt resource=file:patient.jslt property=file:application.properties dependency=mvn:org.apache.camel.quarkus:camel-quarkus-hl7 dependency=mvn:org.apache.camel.quarkus:camel-quarkus-base64 annotation=networking.knative.dev/disable-auto-tls=true trait=owner.target-annotations=networking.knative.dev/disable-auto-tls
   
         import java.util.ArrayList;
         import java.util.HashMap;
         import java.util.List;
         import java.util.Map;
   ...
   ...
   ...
   traits:
       camel:
         configuration:
           properties:
           - fhirUrl = example.com
           - openehrUrl = example.com
           - templateId = string
           - blobUpload = example.com
       mount:
         configuration:
           resources:
           - configmap:cm-05e3ce58d0d145de025ad919cf0b763216b88cf5/composition.jslt@/etc/camel/resources/composition.jslt
           - configmap:cm-2298cb03631fddcc33ab4d3832953f3e535d37b2/patient.jslt@/etc/camel/resources/patient.jslt
       owner:
         configuration:
           targetAnnotations:
           - networking.knative.dev/disable-auto-tls
   ```
   
   The resources `composition.jslt` and `patient.jslt` are applied to the Kubernetes cluster as configmaps, and their reference is present here. But they are not included in the YAML output.
   
   ## Expected
   The YAML file should include the resources, configmaps, and secrets generated from files along with the the integration CRD.


-- 
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: commits-unsubscribe@camel.apache.org.apache.org

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


[GitHub] [camel-k] squakez commented on issue #3396: kamel run --output yaml does not include resources

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3396:
URL: https://github.com/apache/camel-k/issues/3396#issuecomment-1166987150

   Resource field is deprecated since a while (https://github.com/apache/camel-k/commit/a73dce39ce2ceec9dc55492d518caac042812b67#diff-df704f21201b6d30fe851b7bee054f77855f8b5720e77d93e8462fffb9c71cb3) and will be soon removed. Instead you should use configmap or secret. As you can see in your code, the resource is converted into a configmap automatically for you and exported as:
   ```
           resources:
           - configmap:cm-05e3ce58d0d145de025ad919cf0b763216b88cf5/composition.jslt@/etc/camel/resources/composition.jslt
           - configmap:cm-2298cb03631fddcc33ab4d3832953f3e535d37b2/patient.jslt@/etc/camel/resources/patient.jslt
   ```
   However, for portability this is not good. In such case you need to use configmap on your own.


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-k] squakez commented on issue #3396: kamel run --output yaml does not include resources

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3396:
URL: https://github.com/apache/camel-k/issues/3396#issuecomment-1183076283

   Closing as answered. Feel free to reach out for more info.


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-k] squakez closed issue #3396: kamel run --output yaml does not include resources

Posted by GitBox <gi...@apache.org>.
squakez closed issue #3396: kamel run --output yaml does not include resources
URL: https://github.com/apache/camel-k/issues/3396


-- 
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: commits-unsubscribe@camel.apache.org

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