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

   I use the camel promote command. The command does not transfer any 
annotations from the integration. See the example.
   
   `apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
     annotations:
       camel.apache.org/operator.id: camel-k
       prometheus.io/path: /q/metrics
       prometheus.io/port: ""
       prometheus.io/scrape: "true"
     creationTimestamp: null
     name: rest-dsl
     namespace: default
   spec:
     sources:
     - content: "/**\r\n * \r\n *    curl http://XXX/hello\r\n *\r\n * \r\n 
*/\r\n\r\n//
         camel-k: language=java trait=logging.enabled=true\r\nimport 
org.apache.camel.CamelContext;\r\nimport
         org.apache.camel.Exchange;\r\nimport 
org.apache.camel.Processor;\r\n\r\npublic
         class RestDSL extends org.apache.camel.builder.RouteBuilder {\r\n    
@Override\r\n
         \   public void configure() throws Exception {\r\n        rest()\r\n   
         .get(\"/hello\")\r\n
         \               .to(\"direct:hello\");\r\n\r\n        
from(\"direct:hello\")\r\n
         \           .setHeader(Exchange.CONTENT_TYPE, 
constant(\"text/plain\"))\r\n
         \           .log(\"Hello World 2\")\r\n            
.log(String.valueOf(simple(\"headers:${headers}\")))\r\n
         \           .process(new Processor(){\r\n                @Override\r\n 
               public
         void process(Exchange exchange) throws Exception {\r\n                 
   CamelContext
         ctx = exchange.getContext();\r\n                    
System.out.println(\"can
         be breakpoint on this line :\" + ctx.getName());\r\n                
}\r\n            })\r\n
         \           .transform().simple(\"Hello World\");\r\n    }\r\n}"
       name: RestDSL.java
     traits:
       container:
         limitCPU: 1000m
         limitMemory: 1Gi
         requestCPU: 1000m
         requestMemory: 1Gi
       logging:
         enabled: true`
   
   Kamel promote -oyaml export without annotations:
   
   `apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
     creationTimestamp: null
     name: rest-dsl
     namespace: default2
   spec:
     sources:
     - content: "/**\r\n * \r\n *    curl http://XXX/hello\r\n *\r\n * \r\n 
*/\r\n\r\n//
         camel-k: language=java trait=logging.enabled=true\r\nimport 
org.apache.camel.CamelContext;\r\nimport
         org.apache.camel.Exchange;\r\nimport 
org.apache.camel.Processor;\r\n\r\npublic
         class RestDSL extends org.apache.camel.builder.RouteBuilder {\r\n    
@Override\r\n
         \   public void configure() throws Exception {\r\n        rest()\r\n   
         .get(\"/hello\")\r\n
         \               .to(\"direct:hello\");\r\n\r\n        
from(\"direct:hello\")\r\n
         \           .setHeader(Exchange.CONTENT_TYPE, 
constant(\"text/plain\"))\r\n
         \           .log(\"Hello World 2\")\r\n            
.log(String.valueOf(simple(\"headers:${headers}\")))\r\n
         \           .process(new Processor(){\r\n                @Override\r\n 
               public
         void process(Exchange exchange) throws Exception {\r\n                 
   CamelContext
         ctx = exchange.getContext();\r\n                    
System.out.println(\"can
         be breakpoint on this line :\" + ctx.getName());\r\n                
}\r\n            })\r\n
         \           .transform().simple(\"Hello World\");\r\n    }\r\n}"
       name: RestDSL.java
     traits:
       container:
         image: 
dockerhub.xx.com/camel-k-kit-ci0mlbph6fvc73eci610@sha256:0214491e46bfeb2259f6dd3507762cbdfdef1db61fd1565fb4c39049d27fd293
         limitCPU: 1000m
         limitMemory: 1Gi
         requestCPU: 1000m
         requestMemory: 1Gi
       logging:
         enabled: true`


-- 
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-unsubscr...@camel.apache.org.apache.org

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

Reply via email to