[GitHub] [camel-k] lburgazzoli commented on a diff in pull request #3163: operator: allow to configure the lock name

2022-04-04 Thread GitBox


lburgazzoli commented on code in PR #3163:
URL: https://github.com/apache/camel-k/pull/3163#discussion_r841490794


##
pkg/cmd/operator.go:
##
@@ -40,16 +41,18 @@ func newCmdOperator() (*cobra.Command, *operatorCmdOptions) 
{
cmd.Flags().Int32("health-port", 8081, "The port of the health 
endpoint")
cmd.Flags().Int32("monitoring-port", 8080, "The port of the metrics 
endpoint")
cmd.Flags().Bool("leader-election", true, "Use leader election")
+   cmd.Flags().String("leader-election-id", platform.OperatorLockName, 
"Use the given id as leader election discriminator")
 
return , 
 }
 
 type operatorCmdOptions struct {
-   HealthPort int32 `mapstructure:"health-port"`
-   MonitoringPort int32 `mapstructure:"monitoring-port"`
-   LeaderElection bool  `mapstructure:"leader-election"`
+   HealthPort   int32  `mapstructure:"health-port"`
+   MonitoringPort   int32  `mapstructure:"monitoring-port"`
+   LeaderElection   bool   `mapstructure:"leader-election"`
+   LeaderElectionID string `mapstructure:"leader-election-id"`
 }
 
 func (o *operatorCmdOptions) run(_ *cobra.Command, _ []string) {
-   operator.Run(o.HealthPort, o.MonitoringPort, o.LeaderElection)
+   operator.Run(o.HealthPort, o.MonitoringPort, o.LeaderElection, 
o.LeaderElectionID)

Review Comment:
   This should already happen when the flag is initialized, by default it 
should be that value 



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

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



[GitHub] [camel-k] squakez commented on a diff in pull request #3163: operator: allow to configure the lock name

2022-04-04 Thread GitBox


squakez commented on code in PR #3163:
URL: https://github.com/apache/camel-k/pull/3163#discussion_r841464986


##
pkg/cmd/operator.go:
##
@@ -40,16 +41,18 @@ func newCmdOperator() (*cobra.Command, *operatorCmdOptions) 
{
cmd.Flags().Int32("health-port", 8081, "The port of the health 
endpoint")
cmd.Flags().Int32("monitoring-port", 8080, "The port of the metrics 
endpoint")
cmd.Flags().Bool("leader-election", true, "Use leader election")
+   cmd.Flags().String("leader-election-id", platform.OperatorLockName, 
"Use the given id as leader election discriminator")
 
return , 
 }
 
 type operatorCmdOptions struct {
-   HealthPort int32 `mapstructure:"health-port"`
-   MonitoringPort int32 `mapstructure:"monitoring-port"`
-   LeaderElection bool  `mapstructure:"leader-election"`
+   HealthPort   int32  `mapstructure:"health-port"`
+   MonitoringPort   int32  `mapstructure:"monitoring-port"`
+   LeaderElection   bool   `mapstructure:"leader-election"`
+   LeaderElectionID string `mapstructure:"leader-election-id"`
 }
 
 func (o *operatorCmdOptions) run(_ *cobra.Command, _ []string) {
-   operator.Run(o.HealthPort, o.MonitoringPort, o.LeaderElection)
+   operator.Run(o.HealthPort, o.MonitoringPort, o.LeaderElection, 
o.LeaderElectionID)

Review Comment:
   We need to check if that parameter exists, and, if not, fallback to 
`platform.OperatorLockName` (which I'd call at this stage as 
`platform.OperatorDefaultLockName`)



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

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



[GitHub] [camel-k] astefanutti commented on a diff in pull request #3163: operator: allow to configure the lock name

2022-04-04 Thread GitBox


astefanutti commented on code in PR #3163:
URL: https://github.com/apache/camel-k/pull/3163#discussion_r841459428


##
pkg/cmd/operator.go:
##
@@ -40,16 +41,18 @@ func newCmdOperator() (*cobra.Command, *operatorCmdOptions) 
{
cmd.Flags().Int32("health-port", 8081, "The port of the health 
endpoint")
cmd.Flags().Int32("monitoring-port", 8080, "The port of the metrics 
endpoint")
cmd.Flags().Bool("leader-election", true, "Use leader election")
+   cmd.Flags().String("leader-election-id", platform.OperatorLockName, 
"Use the given id as leader election discriminator")

Review Comment:
   nit: "Use the given ID as the leader election Lease name"



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

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



[GitHub] [camel-k] astefanutti commented on a diff in pull request #3158: Disable deprecate linters

2022-04-04 Thread GitBox


astefanutti commented on code in PR #3158:
URL: https://github.com/apache/camel-k/pull/3158#discussion_r841442770


##
.golangci.yml:
##
@@ -50,9 +52,13 @@ linters:
 - paralleltest
 - tagliatelle
 - tenv
+- scopelint
 - testpackage
 - varnamelen
 - whitespace
 - wrapcheck
 - wsl
+- interfacer

Review Comment:
   It seems it's duplicated?



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

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



[GitHub] [camel] davsclaus commented on a diff in pull request #7336: CAMEL-17885 camel google bigquery: Allow to read service account key file from resolver

2022-04-03 Thread GitBox


davsclaus commented on code in PR #7336:
URL: https://github.com/apache/camel/pull/7336#discussion_r841368425


##
components/camel-google/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/GoogleBigQueryConfiguration.java:
##
@@ -16,29 +16,39 @@
  */
 package org.apache.camel.component.google.bigquery;
 
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 
 @UriParams
-public class GoogleBigQueryConfiguration {
+public class GoogleBigQueryConfiguration implements Cloneable {
 
 @UriParam(description = "ConnectionFactory to obtain connection to 
Bigquery Service. If not provided the default one will be used")
 @Metadata(autowired = true)
 private GoogleBigQueryConnectionFactory connectionFactory;
+
 @UriParam(description = "Field name to use as insert id")
 private String useAsInsertId;
+
 @UriPath(label = "common", description = "Google Cloud Project Id")
 @Metadata(required = true)
 private String projectId;
+
 @UriPath(label = "common", description = "BigQuery Dataset Id")
 @Metadata(required = true)
 private String datasetId;
+
 @UriPath(label = "common", description = "BigQuery table id")
 @Metadata(required = false)
 private String tableId;
 
+@UriParam(label = "common",

Review Comment:
   label = "security"



##
components/camel-google/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/sql/GoogleBigQuerySQLConfiguration.java:
##
@@ -16,25 +16,33 @@
  */
 package org.apache.camel.component.google.bigquery.sql;
 
+import org.apache.camel.RuntimeCamelException;
 import 
org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 
 @UriParams
-public class GoogleBigQuerySQLConfiguration {
+public class GoogleBigQuerySQLConfiguration implements Cloneable {
 
 @UriParam(description = "ConnectionFactory to obtain connection to 
Bigquery Service. If not provided the default one will be used")
 @Metadata(autowired = true)
 private GoogleBigQueryConnectionFactory connectionFactory;
+
 @UriPath(label = "common", description = "Google Cloud Project Id")
 @Metadata(required = true)
 private String projectId;
+
 @UriPath(label = "common", description = "BigQuery standard SQL query")
 @Metadata(required = true)
 private String queryString;
 
+@UriParam(label = "common",

Review Comment:
   label = "security"



##
components/camel-google/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/GoogleBigQueryEndpoint.java:
##
@@ -55,7 +55,14 @@ protected GoogleBigQueryEndpoint(String endpointUri, 
GoogleBigQueryComponent com
 
 @Override
 public Producer createProducer() throws Exception {
-BigQuery bigquery = 
getConfiguration().getConnectionFactory().getDefaultClient();
+GoogleBigQueryConnectionFactory connFactory = 
configuration.getConnectionFactory();
+if (connFactory == null) {
+connFactory = new GoogleBigQueryConnectionFactory()

Review Comment:
   It is better to move such logic (connFactory == null) block to doStart so 
the producer is not changing endpoint configuration.
   



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

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



[GitHub] [camel-k] tadayosi commented on a diff in pull request #3159: added trait example of services

2022-04-03 Thread GitBox


tadayosi commented on code in PR #3159:
URL: https://github.com/apache/camel-k/pull/3159#discussion_r841355003


##
examples/traits/service/service.java:
##
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//kamel run --trait service.enabled=true
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.example.MyClass;
+
+public class Classpath extends RouteBuilder {
+  @Override
+  public void configure() throws Exception {
+ from("timer:tick")
+.log(MyClass.sayHello());

Review Comment:
   Where is `MyClass`?  You should make it run standalone.
   A rest route should be more straightforward for demonstrating the service 
trait usage, as it would expose some service to other pods:
   https://github.com/apache/camel-k/blob/main/examples/rest/RestDSL.java



##
examples/traits/service/service.java:
##
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//kamel run --trait service.enabled=true

Review Comment:
   Add file name to the command so it can run as is.



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

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



[GitHub] [camel-k] tadayosi commented on a diff in pull request #3152: Example to show usage of prometheus trait

2022-04-03 Thread GitBox


tadayosi commented on code in PR #3152:
URL: https://github.com/apache/camel-k/pull/3152#discussion_r841343432


##
examples/traits/prometheus/README.md:
##
@@ -0,0 +1,19 @@
+# Camel K Prometheus Trait
+
+In this section you will find examples about fine tuning your `Integration` 
using **Prometheus** `trait` capability.
+
+## Use Case Demonstration
+
+The following query may be used to get statistics about the number of events 
successfully handled by the `Integration`
+
+```
+public void configure() {
+from("timer:stream?period={{timer.period}}")
+.routeId("unreliable-service")
+.setBody(header(Exchange.TIMER_COUNTER).prepend("event #"))
+.to("microprofile-metrics:meter:success"); 
+}
+```
+
+Similarly other use cases can be to retrieve information on unprocessed 
events, number of retries made to process an event, etc. For more information 
on configuring custom or native Camel K Integration metrics, please refer to 
the [6.2. Configuring Camel K integration 
metrics](https://access.redhat.com/documentation/en-us/red_hat_integration/2020-q4/html/deploying_camel_k_integrations_on_openshift/monitoring-camel-k)
 section. 

Review Comment:
   We are a vendor-neutral opensource project, so it's better to avoid 
referring a specific product's documentation.
   Instead, we have this documentation for monitoring Camel K:
   
https://camel.apache.org/camel-k/1.8.x/observability/monitoring/integration.html



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

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



[GitHub] [camel-k] tadayosi commented on a diff in pull request #3152: Example to show usage of prometheus trait

2022-04-03 Thread GitBox


tadayosi commented on code in PR #3152:
URL: https://github.com/apache/camel-k/pull/3152#discussion_r841339359


##
Hello.java:
##
@@ -0,0 +1,17 @@
+// camel-k: language=java

Review Comment:
   I think this one is a leftover. Please remove it from your PR.



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

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



[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #8: chore: avoid spamming the dev mailing list (from next time)

2021-02-16 Thread GitBox


nicolaferraro opened a new pull request #8:
URL: https://github.com/apache/camel-kamelets/pull/8


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #7: Fix links in documentation

2021-02-16 Thread GitBox


nicolaferraro merged pull request #7:
URL: https://github.com/apache/camel-kamelets/pull/7


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #7: Fix links in documentation

2021-02-16 Thread GitBox


nicolaferraro opened a new pull request #7:
URL: https://github.com/apache/camel-kamelets/pull/7


   This fixes the links to Camel K installation and removes the unneeded tree 
node in left menu.



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


nicolaferraro merged pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6


   



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.

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




[GitHub] [camel-kamelets] davsclaus commented on pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


davsclaus commented on pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6#issuecomment-779737440


   > > > btw is the source code generated list of options in the same order as 
in the yaml file (eg so users may put the most important in the top).
   > > 
   > > 
   > > Well, currently it should be alphabetical with required fields first... 
But we can think about it..
   > 
   > The problem is that it's a map that loses the order when unmarhsalled.. 
that's more a problem that happens e.g. on Kube, once you apply it you lose the 
order
   
   ah okay A..Z is also fine, just that its the same. 
   
   We had that problem earlier in core camel where a regen would shuffle the 
options. So its best to have a fixed sorting in the build process



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.

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




[GitHub] [camel-kamelets] nicolaferraro edited a comment on pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


nicolaferraro edited a comment on pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6#issuecomment-779733631


   > > btw is the source code generated list of options in the same order as in 
the yaml file (eg so users may put the most important in the top).
   > 
   > Well, currently it should be alphabetical with required fields first... 
But we can think about it..
   
   The problem is that it's a map that loses the order when unmarhsalled.. 
that's more a problem that happens e.g. on Kube, once you apply it you lose the 
order



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


nicolaferraro commented on pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6#issuecomment-779733631


   > > btw is the source code generated list of options in the same order as in 
the yaml file (eg so users may put the most important in the top).
   > 
   > Well, currently it should be alphabetical with required fields first... 
But we can think about it..
   
   The problem is that it's a map that loses the order when unmarhsalled..



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


nicolaferraro commented on pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6#issuecomment-779733093


   > btw is the source code generated list of options in the same order as in 
the yaml file (eg so users may put the most important in the top).
   
   Well, currently it should be alphabetical with required fields first... But 
we can think about it..



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.

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




[GitHub] [camel-kamelets] davsclaus commented on pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


davsclaus commented on pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6#issuecomment-779710972


   btw is the source code generated list of options in the same order as in the 
yaml file (eg so users may put the most important in the top).



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.

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




[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #6: chore: fix generated YAML and required props

2021-02-16 Thread GitBox


nicolaferraro opened a new pull request #6:
URL: https://github.com/apache/camel-kamelets/pull/6


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #2: Auto-generate the Kamelet Catalog website

2021-02-15 Thread GitBox


nicolaferraro merged pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-15 Thread GitBox


nicolaferraro commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-779311323


   Let's merge this to unlock: https://github.com/apache/camel-website/pull/536



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #5: Added ASF Yaml configuration

2021-02-15 Thread GitBox


nicolaferraro merged pull request #5:
URL: https://github.com/apache/camel-kamelets/pull/5


   



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.

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




[GitHub] [camel-kamelets] oscerd opened a new pull request #5: Added ASF Yaml configuration

2021-02-15 Thread GitBox


oscerd opened a new pull request #5:
URL: https://github.com/apache/camel-kamelets/pull/5


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #4: chore: add some kamelets from existing examples

2021-02-15 Thread GitBox


nicolaferraro merged pull request #4:
URL: https://github.com/apache/camel-kamelets/pull/4


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #4: chore: add some kamelets from existing examples

2021-02-15 Thread GitBox


nicolaferraro opened a new pull request #4:
URL: https://github.com/apache/camel-kamelets/pull/4


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #3: chore: add CI configuration

2021-02-15 Thread GitBox


nicolaferraro merged pull request #3:
URL: https://github.com/apache/camel-kamelets/pull/3


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #3: chore: add CI configuration

2021-02-15 Thread GitBox


nicolaferraro commented on pull request #3:
URL: https://github.com/apache/camel-kamelets/pull/3#issuecomment-779085842


   Let's merge this to enable actions



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.

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




[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #3: chore: add CI configuration

2021-02-12 Thread GitBox


nicolaferraro opened a new pull request #3:
URL: https://github.com/apache/camel-kamelets/pull/3


   This should setup a CI based on Github actions. I've added the test for the 
timer-source Kamelet.
   
   We should find a good solution for easily manage credentials before we can 
test the more complex ones.



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.

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




[GitHub] [camel-kamelets] zregvart commented on a change in pull request #2: Auto-generate the Kamelet Catalog website

2021-02-12 Thread GitBox


zregvart commented on a change in pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#discussion_r575317959



##
File path: docs/generator/generator.go
##
@@ -0,0 +1,307 @@
+package main
+
+import (
+   "encoding/base64"
+   "fmt"
+   "io/ioutil"
+   "os"
+   "path/filepath"
+   "sort"
+   "strings"
+
+   camel "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+   "k8s.io/apimachinery/pkg/runtime"
+   "k8s.io/apimachinery/pkg/runtime/schema"
+   "k8s.io/apimachinery/pkg/runtime/serializer"
+   "k8s.io/apimachinery/pkg/util/yaml"
+)
+
+func main() {
+   if len(os.Args) != 3 {
+   println("usage: generator kamelets-path doc-root")
+   os.Exit(1)
+   }
+
+   dir := os.Args[1]
+   out := os.Args[2]
+
+   kamelets := listKamelets(dir)
+
+   links := make([]string, 0)
+   for _, k := range kamelets {
+   img := saveImage(k, out)
+   produceDoc(k, out, img)
+
+   links = append(links, fmt.Sprintf("** xref:ROOT:%s.adoc[%s 
%s]", k.Name, img, k.Spec.Definition.Title))
+   }
+
+   saveNav(links, out)
+}
+
+func saveNav(links []string, out string) {
+   content := "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n"
+   content += "* xref:ROOT:index.adoc[Kamelet Catalog]\n"
+   for _, l := range links {
+   content += l + "\n"
+   }
+   content += "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n"
+   dest := filepath.Join(out, "nav.adoc")
+   if _, err := os.Stat(dest); err == nil {
+   err = os.Remove(dest)
+   handleGeneralError(fmt.Sprintf("cannot remove file %q", dest), 
err)
+   }
+   err := ioutil.WriteFile(dest, []byte(content), 0666)
+   handleGeneralError(fmt.Sprintf("cannot write file %q", dest), err)
+   fmt.Printf("%q written\n", dest)
+}
+
+func saveImage(k camel.Kamelet, out string) string {
+   if ic, ok := k.ObjectMeta.Annotations["camel.apache.org/kamelet.icon"]; 
ok {
+   svgb64Prefix := "data:image/svg+xml;base64,"
+   if strings.HasPrefix(ic, svgb64Prefix) {
+   data := ic[len(svgb64Prefix):]
+   decoder := base64.NewDecoder(base64.StdEncoding, 
strings.NewReader(data))
+   iconContent, err := ioutil.ReadAll(decoder)
+   handleGeneralError(fmt.Sprintf("cannot decode icon from 
Kamelet %s", k.Name), err)
+   dest := filepath.Join(out, "assets", "images", 
"kamelets", fmt.Sprintf("%s.svg", k.Name))
+   if _, err := os.Stat(dest); err == nil {
+   err = os.Remove(dest)
+   handleGeneralError(fmt.Sprintf("cannot remove 
file %q", dest), err)
+   }
+   err = ioutil.WriteFile(dest, iconContent, 0666)
+   handleGeneralError(fmt.Sprintf("cannot write file %q", 
dest), err)
+   fmt.Printf("%q written\n", dest)
+   return fmt.Sprintf("image:kamelets/%s.svg[]", k.Name)
+   }
+   }
+   return ""
+}
+
+func produceDoc(k camel.Kamelet, out string, image string) {
+   docFile := filepath.Join(out, "pages", k.Name + ".adoc")
+
+   content := "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n"
+   content += "= " + image + " " + k.Spec.Definition.Title + "\n"
+   content += "\n"
+   if prov, ok := k.Annotations["camel.apache.org/provider"]; ok {
+   content += fmt.Sprintf("*Provided by: %q*\n", prov)
+   content += "\n"
+   }
+   content += k.Spec.Definition.Description + "\n"
+   content += "\n"
+   content += "== Configuration Options\n"
+   content += "\n"
+
+   required := make(map[string]bool)
+   keys := make([]string, 0, len(k.Spec.Definition.Properties))
+
+   if len(k.Spec.Definition.Properties) > 0 {
+   for _, r := range k.Spec.Definition.Required {
+   required[r] = true
+   }
+
+   for key := range k.Spec.Definition.Properties {
+   keys = append(keys, key)
+   }
+   sort.Slice(keys, func(i, j int) bool {
+   ri := required[keys[i]]
+   rj := required[keys[j]]
+   if ri && !rj {
+   return true
+   } else if !ri && rj {
+   return false
+   }
+   return keys[i] < keys[j]
+   })
+
+   content += fmt.Sprintf("The following table summarizes the 
configuration options available for the `%s` Kamelet:\n", k.Name)
+
+   content += 
`[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]` + "\n"
+   content += "|===\n"
+ 

[GitHub] [camel-kamelets] zregvart commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-12 Thread GitBox


zregvart commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-778164854


   I've created a PR to polish this against this PR: 
https://github.com/nicolaferraro/camel-kamelets/pull/1



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


nicolaferraro commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777845389


   > I'd like to polish this a bit, either as a PR on top of this PR 
(preferred) or as a followup PR.
   
   You're welcome to do so. Look also at 
https://github.com/apache/camel-website/pull/537 to completely remove the 
custom UI from here.



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.

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




[GitHub] [camel-kamelets] zregvart commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


zregvart commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-15643


   I'd like to polish this a bit, either as a PR on top of this PR (preferred) 
or as a followup PR.



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


nicolaferraro commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777409589


   > > > @nicolaferraro perhaps you can start a pull request with the changes 
needed to the website on the website repository. Not sure what's to gain by 
adding those changes here. Is the end goal to publish to a different domain?
   > > 
   > > 
   > > No, it's only for the Camel website, I did them here just to have a 
quick preview in dev + I want later to integrate Netlify on PR.. but the code 
is well separated so the plan was to move it to the camel-website from the 
beginning. I'll try to publish the layout there, and also the final bundle so I 
can link it from here (if possible with the new Apache rules for Githu 
Actions...)
   > 
   > If at all possible do not add another UI bundle to the camel-website, 
there are a number of optimizations that went into the apache-camel-ui UI 
bundle in the camel-website repository that you'll need to repeat in the second 
bundle. Adding changes to the existing apache-camel-ui UI bundle should be 
preferred.
   > 
   > This also maintains the separation of presentation vs content we have 
between the camel-website and other git repositories we pull to build the 
website.
   > 
   > Not sure about the Netlify integration, this is already present on the 
camel-website repository.
   > 
   > If you wish trigger publishing of changes made here to the website, that 
needs to happen with the trigger to the 
[Camel.website](https://ci-builds.apache.org/job/Camel/job/Camel.website/) job 
on the ASF Jenkins. Automating that could be done via a generic webhook on push 
to this repository (would require a secret to be added by INFRA).
   
   It wasn't my intention.. I kept changes separated into a bunch of files to 
merge them: https://github.com/apache/camel-website/pull/536
   
   I managed to display this catalog with the website UI with that change:
   
   ![Screenshot from 2021-02-11 
13-13-15](https://user-images.githubusercontent.com/4151857/107635153-f8b6e100-6c6a-11eb-85c4-0835c1c094cd.png)
   



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.

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




[GitHub] [camel-kamelets] zregvart commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


zregvart commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777395928


   > > @nicolaferraro perhaps you can start a pull request with the changes 
needed to the website on the website repository. Not sure what's to gain by 
adding those changes here. Is the end goal to publish to a different domain?
   > 
   > No, it's only for the Camel website, I did them here just to have a quick 
preview in dev + I want later to integrate Netlify on PR.. but the code is well 
separated so the plan was to move it to the camel-website from the beginning. 
I'll try to publish the layout there, and also the final bundle so I can link 
it from here (if possible with the new Apache rules for Githu Actions...)
   
   If at all possible do not add another UI bundle to the camel-website, there 
are a number of optimizations that went into the apache-camel-ui UI bundle in 
the camel-website repository that you'll need to repeat in the second bundle. 
Adding changes to the existing apache-camel-ui UI bundle should be preferred.
   
   This also maintains the separation of presentation vs content we have 
between the camel-website and other git repositories we pull to build the 
website.
   
   Not sure about the Netlify integration, this is already present on the 
camel-website repository.
   
   If you wish trigger publishing of changes made here to the website, that 
needs to happen with the trigger to the 
[Camel.website](https://ci-builds.apache.org/job/Camel/job/Camel.website/) job 
on the ASF Jenkins. Automating that could be done via a generic webhook on push 
to this repository (would require a secret to be added by INFRA).



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.

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




[GitHub] [camel-kamelets] astefanutti commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


astefanutti commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777369635


   Gorgeous !



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


nicolaferraro commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777369043


   > @nicolaferraro perhaps you can start a pull request with the changes 
needed to the website on the website repository. Not sure what's to gain by 
adding those changes here. Is the end goal to publish to a different domain?
   
   No, it's only for the Camel website, I did them here just to have a quick 
preview in dev + I want later to integrate Netlify on PR.. but the code is well 
separated so the plan was to move it to the camel-website from the beginning. 
I'll try to publish the layout there, and also the final bundle so I can link 
it from here (if possible with the new Apache rules for Githu Actions...)



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.

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




[GitHub] [camel-kamelets] zregvart commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


zregvart commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777359493


   @nicolaferraro perhaps you can start a pull request with the changes needed 
to the website on the website repository. Not sure what's to gain by adding 
those changes here. Is the end goal to publish to a different domain?



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.

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




[GitHub] [camel-kamelets] lburgazzoli commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


lburgazzoli commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777351133


   > > random thought:
   > > 
   > > * we should probably have some way of grouping kamelets, i.e. there may 
be a number of telegram related kamelets
   > > * we shold think about versioning
   > 
   > Yeah, so versioning can be done by tagging this repo as [per 
proposal](https://github.com/apache/camel-k/blob/master/proposals/provided-kamelets.adoc?rgh-link-date=2021-02-11T10%3A25%3A27Z).
 Antora supports multiple versions oob.
   > 
   
   I was more thinking about kamelet specific versions, giving that they can be 
used even without a catalog, whould we also let people browse to a specific 
kamelet version ?
   
   > There's a `camel.apache.org/kamelet.group=` label that 
should be used for grouping. The UI still does not support that but that's an 
improvement.
   > I wonder if we should make the group mandatory and have it for all 
Kamelets. The catalog can have both a link to a page where single kamelets of a 
group are listed (if more than one), but also direct links to the specific 
Kamelets in the display box.
   
   +1 for making group mandatory
   



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


nicolaferraro commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777347111


   > I'm not sure if it makes sense to have the same ui we are using on the 
camel website, just for visual identity, btw we need @zregvart to include it.
   
   Yeah, this includes a custom UI with additional CSS and layout on top of the 
Antora default one, but it's a temporary solution until we embed the camel 
default UI.
   
   I'd like adding the "catalog" layout to the main Camel UI and the best would 
be to have it published in an HTTP location (maybe using Github actions, like 
the Antora folks seem to do), so that we can reference it back from here in: 
https://github.com/apache/camel-kamelets/blob/15165a71c888f373033f370439176039e5987c5a/docs/antora-playbook.yml#L15
   
   Is it possible @zregvart ?



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.

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




[GitHub] [camel-kamelets] oscerd commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


oscerd commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777344312


   I'm not sure if it makes sense to have the same ui we are using on the camel 
website, just for visual identity, btw we need @zregvart to include it.



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


nicolaferraro commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777343441


   > random thought:
   > 
   > * we should probably have some way of grouping kamelets, i.e. there may be 
a number of telegram related kamelets
   > * we shold think about versioning
   
   Yeah, so versioning can be done by tagging this repo as [per 
proposal](https://github.com/apache/camel-k/blob/master/proposals/provided-kamelets.adoc).
 Antora supports multiple versions oob.
   
   There's a `camel.apache.org/kamelet.group=` label that 
should be used for grouping. The UI still does not support that but that's an 
improvement.
   I wonder if we should make the group mandatory and have it for all Kamelets. 
The catalog can have both a link to a page where single kamelets of a group are 
listed (if more than one), but also direct links to the specific Kamelets in 
the display box.



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.

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




[GitHub] [camel-kamelets] lburgazzoli commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


lburgazzoli commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777338534


   random thought:
   - we should probably have some way of grouping kamelets, i.e. there may be a 
number of telegram related kamelets
   - we shold think about versioning 
   



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.

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




[GitHub] [camel-kamelets] oscerd commented on pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


oscerd commented on pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2#issuecomment-777337272


   We need @zregvart for including this somewhere in the website.



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.

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




[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #2: Auto-generate the Kamelet Catalog website

2021-02-11 Thread GitBox


nicolaferraro opened a new pull request #2:
URL: https://github.com/apache/camel-kamelets/pull/2


   This generates an Antora module for the Kamelet catalog directly from the 
Kamelet YAML files.
   
   cc: @davsclaus , @oscerd , @astefanutti , @squakez , @doru1004 , 
@lburgazzoli, @christophd
   
   A preview...
   
   ![Screenshot from 2021-02-11 
10-07-05](https://user-images.githubusercontent.com/4151857/107623393-8be71b00-6c59-11eb-9711-b45ae7d7247d.png)
   
   ![Screenshot from 2021-02-11 
10-16-16](https://user-images.githubusercontent.com/4151857/107623455-a28d7200-6c59-11eb-9eac-f15f430fff20.png)
   
   ![Screenshot from 2021-02-11 
10-07-21](https://user-images.githubusercontent.com/4151857/107623508-b933c900-6c59-11eb-867f-3cdb6a3de5d8.png)
   
   
   
   Next step for the UI:
   - Move the markup to the main Camel website UI bundle
   - Add Netlify integration to this repo
   - Add a section in the main Camel website



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.

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




[GitHub] [camel-kamelets] nicolaferraro merged pull request #1: Initial rules about the catalog

2021-02-10 Thread GitBox


nicolaferraro merged pull request #1:
URL: https://github.com/apache/camel-kamelets/pull/1


   



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.

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




[GitHub] [camel-kamelets] nicolaferraro commented on a change in pull request #1: Initial rules about the catalog

2021-02-08 Thread GitBox


nicolaferraro commented on a change in pull request #1:
URL: https://github.com/apache/camel-kamelets/pull/1#discussion_r571967885



##
File path: README.md
##
@@ -1,6 +1,126 @@
-# Apache Camel - Kamelet Repository
+# Apache Camel - Kamelet Catalog
 
-This repository contains the default catalog of Kamelet definitions that can 
be used with Apache Camel and its sub-projects.
+This repository contains the default Kamelet catalog used by Apache Camel and 
its sub-projects.
 
-More information about Kamelets can be found in the [Apache Camel K 
documentation](https://camel.apache.org/camel-k/latest/kamelets/kamelets.html).
+Kamelets in this repository can be used natively in [Apache Camel 
K](https://github.com/apache/camel-k) integrations, without additional 
configuration steps:
+users just need to reference the Kamelets by name in the URI (e.g. 
`kamelet:timer-source?message=Hello`), or use them in a `KameletBinding`.
 
+**NOTE**: Camel K (and other sub-projects) will only use a specific version of 
this Kamelet catalog. Refer to the release notes of the sub-project for more 
information.
+
+Documents and guides about Kamelets can be found in the [Apache Camel K 
documentation](https://camel.apache.org/camel-k/latest/kamelets/kamelets.html).
+
+## Guidelines for contributions
+
+Kamelets in this repository are intended to be generic connectors that any 
external platform can embed in order to leverage the Apache Camel integration 
capabilities.
+
+All Kamelets posted here will be subject to the scrutiny of the Apache Camel 
PMC to assess their compliance with the ecosystem and, in any case, they 
**MUST** be in line with the general [Apache Code of 
Conduct](https://www.apache.org/foundation/policies/conduct.html).
+
+### General Format
+
+Kamelets **MUST** be provided in the *Kubernetes YAML* format, i.e. they 
**MUST** be resources that can be applied on a cluster using the Kubernetes 
`kubectl` CLI.
+
+The file name of each Kamelet **MUST** follow this specific pattern: 
`.kamelet.yaml`. The `` **MUST** match field 
`metadata` -> `name` inside the Kamelet YAML.
+
+For the time being, we'll accept only two kind of Kamelets:
+
+- **Sources**: Kamelets producing data that can be forwarded to any chosen 
destination. In the Camel jargon, a source can be used consumer-side.
+Kamelets belonging to this category **MUST** be marked with label: 
`camel.apache.org/kamelet.type=source`.
+- **Sinks**: Kamelets that accept data with a specific datashape and forward 
it to an external system. In the Camel jargon, a sink can be used producer-side.
+Kamelets belonging to this category **MUST** be marked with label: 
`camel.apache.org/kamelet.type=sink`.
+
+All Kamelets **MUST** provide a value for label 
`camel.apache.org/kamelet.type`.
+
+All Kamelets **MUST** declare an icon in the `camel.apache.org/kamelet.icon` 
annotation using the embedded URL `data:image` format. An icon annotation 
**CANNOT** contain a link to an external location. A Kamelet **SHOULD** use the 
specific `data:image/svg+xml;base64` format whenever it's possible.

Review comment:
   Yeah, I see your concerns... I thought it would make sense to have a web 
module generated for the kamelets in this repo and previewed by Netlify on each 
PR. This way we can either check the icon (but also the schema) in the browser 
and also include the Kamelet catalog in the main Camel website. Could it work?





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.

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




[GitHub] [camel-kamelets] davsclaus commented on a change in pull request #1: Initial rules about the catalog

2021-02-08 Thread GitBox


davsclaus commented on a change in pull request #1:
URL: https://github.com/apache/camel-kamelets/pull/1#discussion_r571942138



##
File path: README.md
##
@@ -1,6 +1,126 @@
-# Apache Camel - Kamelet Repository
+# Apache Camel - Kamelet Catalog
 
-This repository contains the default catalog of Kamelet definitions that can 
be used with Apache Camel and its sub-projects.
+This repository contains the default Kamelet catalog used by Apache Camel and 
its sub-projects.
 
-More information about Kamelets can be found in the [Apache Camel K 
documentation](https://camel.apache.org/camel-k/latest/kamelets/kamelets.html).
+Kamelets in this repository can be used natively in [Apache Camel 
K](https://github.com/apache/camel-k) integrations, without additional 
configuration steps:
+users just need to reference the Kamelets by name in the URI (e.g. 
`kamelet:timer-source?message=Hello`), or use them in a `KameletBinding`.
 
+**NOTE**: Camel K (and other sub-projects) will only use a specific version of 
this Kamelet catalog. Refer to the release notes of the sub-project for more 
information.
+
+Documents and guides about Kamelets can be found in the [Apache Camel K 
documentation](https://camel.apache.org/camel-k/latest/kamelets/kamelets.html).
+
+## Guidelines for contributions
+
+Kamelets in this repository are intended to be generic connectors that any 
external platform can embed in order to leverage the Apache Camel integration 
capabilities.
+
+All Kamelets posted here will be subject to the scrutiny of the Apache Camel 
PMC to assess their compliance with the ecosystem and, in any case, they 
**MUST** be in line with the general [Apache Code of 
Conduct](https://www.apache.org/foundation/policies/conduct.html).
+
+### General Format
+
+Kamelets **MUST** be provided in the *Kubernetes YAML* format, i.e. they 
**MUST** be resources that can be applied on a cluster using the Kubernetes 
`kubectl` CLI.
+
+The file name of each Kamelet **MUST** follow this specific pattern: 
`.kamelet.yaml`. The `` **MUST** match field 
`metadata` -> `name` inside the Kamelet YAML.
+
+For the time being, we'll accept only two kind of Kamelets:
+
+- **Sources**: Kamelets producing data that can be forwarded to any chosen 
destination. In the Camel jargon, a source can be used consumer-side.
+Kamelets belonging to this category **MUST** be marked with label: 
`camel.apache.org/kamelet.type=source`.
+- **Sinks**: Kamelets that accept data with a specific datashape and forward 
it to an external system. In the Camel jargon, a sink can be used producer-side.
+Kamelets belonging to this category **MUST** be marked with label: 
`camel.apache.org/kamelet.type=sink`.
+
+All Kamelets **MUST** provide a value for label 
`camel.apache.org/kamelet.type`.
+
+All Kamelets **MUST** declare an icon in the `camel.apache.org/kamelet.icon` 
annotation using the embedded URL `data:image` format. An icon annotation 
**CANNOT** contain a link to an external location. A Kamelet **SHOULD** use the 
specific `data:image/svg+xml;base64` format whenever it's possible.
+
+Kamelets that are logically related (e.g. all Kamelets that allow doing things 
with Twitter) **SHOULD** be linked together using the label 
`camel.apache.org/kamelet.group=` (e.g. 
`camel.apache.org/kamelet.group=Twitter`) to ease visualization in tooling.
+
+We provide an example of Kamelet to give more context to the following 
sections:
+
+```yaml
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: timer-source
+  annotations:
+camel.apache.org/kamelet.icon: data:image/svg+xml;base64,PD94...
+  labels:
+camel.apache.org/kamelet.type: source
+spec:
+  definition:
+title: Timer Source
+description: Produces periodic events with a custom payload
+required:
+  - message
+properties:
+  period:
+title: Period
+description: The interval between two events
+type: integer
+default: 1000
+  message:
+title: Message
+description: The message to generate
+type: string
+example: hello world
+  types:
+out:
+  mediaType: text/plain
+  flow:
+from:
+  uri: timer:tick
+  parameters:
+period: "{{period}}"
+  steps:
+- set-body:
+constant: "{{message}}"
+- to: kamelet:sink
+
+```
+
+
+### Flow Code
+
+The Camel route that defines the behavior of the Kamelet **MUST** be provided 
in YAML flow syntax.
+The Kamelet **MAY** declare additional supporting routes that **MUST** be 
written in YAML syntax (to provide better support in all Camel subprojects).
+
+The code of a "source" Kamelet must send data to the `kamelet:sink` special 
endpoint. The code of a "sink" Kamelet must consume data from the special 
endpoint `kamelet:source`.
+
+The Kamelet **CAN** declare dependencies on Camel components using the syntax 
`camel:` (e.g. `camel:telegram`).

Review comment:
   For these CAN it would be good to have 

[GitHub] [camel-kamelets] nicolaferraro opened a new pull request #1: Initial rules about the catalog

2021-02-08 Thread GitBox


nicolaferraro opened a new pull request #1:
URL: https://github.com/apache/camel-kamelets/pull/1


   Some general rules for contributions to the official Kamelet catalog.
   
   cc: @davsclaus , @oscerd , @astefanutti , @squakez , @doru1004 , @lburgazzoli



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.

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




[GitHub] [camel] Humbedooh commented on issue #3773: Send pull requests mails to the commits mailings list instead of to t…

2020-04-23 Thread GitBox


Humbedooh commented on issue #3773:
URL: https://github.com/apache/camel/pull/3773#issuecomment-618576636


   testing as well, hmm



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.

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




[GitHub] [camel] PascalSchumacher commented on issue #3773: Send pull requests mails to the commits mailings list instead of to t…

2020-04-23 Thread GitBox


PascalSchumacher commented on issue #3773:
URL: https://github.com/apache/camel/pull/3773#issuecomment-618557165


   another test comment



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.

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




[GitHub] [camel] PascalSchumacher commented on issue #3773: Send pull requests mails to the commits mailings list instead of to t…

2020-04-23 Thread GitBox


PascalSchumacher commented on issue #3773:
URL: https://github.com/apache/camel/pull/3773#issuecomment-618547220


   Test comment to see if the change is in effect.



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.

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




[GitHub] [camel] PascalSchumacher opened a new pull request #3773: Send pull requests mails to the commits mailings list instead of to t…

2020-04-23 Thread GitBox


PascalSchumacher opened a new pull request #3773:
URL: https://github.com/apache/camel/pull/3773


   …he developer mailing list.
   
   Since the beginning of this week some messages for camel (core) e.g.
   
   E.g. 
https://mail-archives.apache.org/mod_mbox/camel-dev/202004.mbox/%3Ccamel.3762.MDExOlB1bGxSZXF1ZXN0NDA2MDQxMzY0.gitbox%40gitbox.apache.org%3E
   
   are send to dev@camel.apache.org again.
   
   Therefore I created https://issues.apache.org/jira/browse/INFRA-20178. Infra 
suggested that we add a `.asf.yaml` file to configure it our self (see: 
https://cwiki.apache.org/confluence/display/INFRA/.asf.yaml+features+for+git+repositories#id-.asf.yamlfeaturesforgitrepositories-Notificationsettingsforrepositories
 for configuration options.)
   



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.

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




[GitHub] [camel] djencks commented on issue #3669: resolves CAMEL-14771: unambiguous property name and some more source info

2020-04-23 Thread GitBox


djencks commented on issue #3669:
URL: https://github.com/apache/camel/pull/3669#issuecomment-618490176


   I'm going to have another look at 2.x, for generating index tables, and this 
might possibly be needed there lets leave this open for a few more days.



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.

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




[GitHub] [camel] ppalaga opened a new pull request #3772: Camel 14934.3

2020-04-23 Thread GitBox


ppalaga opened a new pull request #3772:
URL: https://github.com/apache/camel/pull/3772


   CAMEL-14934, 3rd batch
   



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.

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




[GitHub] [camel] omarsmak opened a new pull request #3771: CAMEL-14655: Add camel-azure-storage-queue component based on Azure v12 SDK

2020-04-23 Thread GitBox


omarsmak opened a new pull request #3771:
URL: https://github.com/apache/camel/pull/3771


   This is the separated second part of component [camel-azure, the queue 
component 
](https://github.com/apache/camel/tree/master/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue)
 into its isolated component using the new Azure v12 SDK. This covers all the 
functionalities in the legacy component, plus some new operations and basic 
support for batch consumer and enhanced documentation.  
   
   SpringBoot and Karaf starters will follow once is merged.
   
   [ x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   [ x] Each commit in the pull request should have a meaningful subject line 
and body.
   [ x] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   [ x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   [x ] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/master/CONTRIBUTING.md



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.

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




[GitHub] [camel] tadayosi commented on issue #3770: camel-support - Add type-safe resolveEndpoint method

2020-04-23 Thread GitBox


tadayosi commented on issue #3770:
URL: https://github.com/apache/camel/pull/3770#issuecomment-618406164


   Thanks guys. That's the feedback that I expected!  Withdrawing it and I'll 
only change the doc in a next commit.



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.

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




[GitHub] [camel] davsclaus commented on issue #3669: resolves CAMEL-14771: unambiguous property name and some more source info

2020-04-23 Thread GitBox


davsclaus commented on issue #3669:
URL: https://github.com/apache/camel/pull/3669#issuecomment-618315691


   This PR is getting stale and the doc work on 2.x has already been done. So 
lets close this?



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.

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




[GitHub] [camel] davsclaus commented on issue #3770: camel-support - Add type-safe resolveEndpoint method

2020-04-23 Thread GitBox


davsclaus commented on issue #3770:
URL: https://github.com/apache/camel/pull/3770#issuecomment-618308987


   Ah okay the doc should be changed to use `getEndpoint` 



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.

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




[GitHub] [camel] oscerd commented on issue #3770: camel-support - Add type-safe resolveEndpoint method

2020-04-23 Thread GitBox


oscerd commented on issue #3770:
URL: https://github.com/apache/camel/pull/3770#issuecomment-618308680


   No need to reintroduce the method.



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.

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




[GitHub] [camel] tadayosi commented on issue #3770: camel-support - Add type-safe resolveEndpoint method

2020-04-23 Thread GitBox


tadayosi commented on issue #3770:
URL: https://github.com/apache/camel/pull/3770#issuecomment-618304773


   @davsclaus The doc changing is the exact reason I submitted this. The 
current doc is out-of-date for 3.2.0. Now `CamelContext` doesn't have 
`resolveEndpoint` method at all, and I only find it in `CamelContextHelper`. So 
do you think we should rather recover it in `CamelContext` API?



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.

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




[GitHub] [camel] tadayosi opened a new pull request #3770: camel-support - Add type-safe resolveEndpoint method

2020-04-23 Thread GitBox


tadayosi opened a new pull request #3770:
URL: https://github.com/apache/camel/pull/3770


   It's too small changes to file a JIRA but I'd like you guys to check if I'm 
going in the right direction.



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.

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




[GitHub] [camel] atoulme commented on issue #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-23 Thread GitBox


atoulme commented on issue #3760:
URL: https://github.com/apache/camel/pull/3760#issuecomment-618213872


   Thanks for updating and polishing my code, very appreciated. I look forward 
to using this connector!



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.

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




[GitHub] [camel] atoulme commented on issue #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-23 Thread GitBox


atoulme commented on issue #3760:
URL: https://github.com/apache/camel/pull/3760#issuecomment-618212979


   Thanks for merging. I think I didn't take care of `@UriPath` correctly, it's 
been a while.



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.

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




[GitHub] [camel] oscerd commented on issue #3769: Update lifecycle.adoc

2020-04-23 Thread GitBox


oscerd commented on issue #3769:
URL: https://github.com/apache/camel/pull/3769#issuecomment-618203218


   Thanks



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.

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




[GitHub] [camel] johannesr124 opened a new pull request #3769: Update lifecycle.adoc

2020-04-23 Thread GitBox


johannesr124 opened a new pull request #3769:
URL: https://github.com/apache/camel/pull/3769


   grammatical error
   
   [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful subject line 
and body.
   [ ] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   [ ] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   [ ] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/master/CONTRIBUTING.md



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.

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




[GitHub] [camel] davsclaus commented on issue #3768: CAMEL-14934: (Batch 2) Improve Component, Language, Data format, etc.

2020-04-22 Thread GitBox


davsclaus commented on issue #3768:
URL: https://github.com/apache/camel/pull/3768#issuecomment-617950539


   Thanks this is really great to get better descriptions



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.

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




[GitHub] [camel] ppalaga opened a new pull request #3768: CAMEL-14934: (Batch 2) Improve Component, Language, Data format, etc.

2020-04-22 Thread GitBox


ppalaga opened a new pull request #3768:
URL: https://github.com/apache/camel/pull/3768


   CAMEL-14934, 2nd batch



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.

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




[GitHub] [camel] davsclaus commented on issue #3697: [CAMEL-14818] fixes documentation for Camel Package Maven plugin

2020-04-22 Thread GitBox


davsclaus commented on issue #3697:
URL: https://github.com/apache/camel/pull/3697#issuecomment-617761356


   Thanks Jim this is great



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.

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




[GitHub] [camel] JiriOndrusek commented on issue #3767: CAMEL-14950 camel-undertow: secure with spring-security 5

2020-04-22 Thread GitBox


JiriOndrusek commented on issue #3767:
URL: https://github.com/apache/camel/pull/3767#issuecomment-617747982


   Hi @oscerd , @davsclaus 
   I've prepared POC of integration of spring security into camel undertow.
   
   Feature contains of several changes in camel-undertow. 
   -  
https://github.com/apache/camel/pull/3767/files#diff-93b0f4a074166b188c9ac9afa9cdfda7
 Servlet has to be started (it is required for a filter handling security), but 
servlet is ignored by not wrapping handler of the servlet
   - spi interface was extended by option to start servlet context
   
   The rest of changes is for the new 'component' - which is not component, it 
is implementation of securityProvider for spring security 5:
   - important part is method authenticate, which uses existing servlet and 
start security filter: 
https://github.com/apache/camel/pull/3767/files#diff-06f63626d5c86c1d14d65eea55ed1815R38
   
   Here is an example of use: https://github.com/JiriOndrusek/reproducers/pull/3
   - User has to define securityContext for sprig security 5 
https://github.com/JiriOndrusek/reproducers/pull/3/files#diff-d2f799714dda7811c2142a8266f6ff77
   - and create securityConfiguration, which contains referece to security 
filter:
   
https://github.com/JiriOndrusek/reproducers/pull/3/files#diff-a92c0708392ea09a0da7483bfd4d616aR67
   
   With example, access to from endpoint is secured by keycloak 
(https://github.com/JiriOndrusek/reproducers/pull/3/files#diff-a92c0708392ea09a0da7483bfd4d616aR54)
 and only way how to access this is by addition of bearer token  into the 
request.
   
   I'd like to ask for your opinions about it. 
   (I know that this code is not finished, but it works as POC)
   
   Things to be added:
   - I'm not securing rest endpoint, but it should be done in similar way
   - tests are missing
   - I see some warning during aplication start in debug level - it should be 
solved as well 
   
   
   



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.

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




[GitHub] [camel] jimothyGator commented on issue #3697: [CAMEL-14818] fixes documentation for Camel Package Maven plugin

2020-04-22 Thread GitBox


jimothyGator commented on issue #3697:
URL: https://github.com/apache/camel/pull/3697#issuecomment-617735848


   @oscerd @davsclaus 
   
   Thank you both. I've managed to get my project building by having Maven 
re-compile after type converter loaders are generated. I've updated this branch 
to document how to do that. Please take a look.



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.

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




[GitHub] [camel] JiriOndrusek opened a new pull request #3767: CAMEL-14950 camel-undertow: secure with spring-security 5

2020-04-22 Thread GitBox


JiriOndrusek opened a new pull request #3767:
URL: https://github.com/apache/camel/pull/3767


   DO NOT MERGE - only draft to share idea
   
   [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful subject line 
and body.
   [ ] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   [ ] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   [ ] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/master/CONTRIBUTING.md



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.

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




[GitHub] [camel] oscerd commented on issue #3766: Fixed doc: option 'isImplicit' in FTPS implicit sample

2020-04-21 Thread GitBox


oscerd commented on issue #3766:
URL: https://github.com/apache/camel/pull/3766#issuecomment-617558769


   Thanks!



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.

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




[GitHub] [camel] gerdailger opened a new pull request #3766: Fixed doc: option 'isImplicit' in FTPS implicit sample

2020-04-21 Thread GitBox


gerdailger opened a new pull request #3766:
URL: https://github.com/apache/camel/pull/3766


   option was still called `isImplicit` (Camel 2.x). Changed to `implicit`.



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.

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




[GitHub] [camel] ppalaga opened a new pull request #3765: CAMEL-14934: Improve Component, Language, Data format, etc. descriptions

2020-04-21 Thread GitBox


ppalaga opened a new pull request #3765:
URL: https://github.com/apache/camel/pull/3765


   in Camel Catalog
   
   CAMEL-14934, the first batch of description improvements.



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.

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




[GitHub] [camel] djencks opened a new pull request #3764: Fixes CAMEL-14941: Camel 3.2.x issue 14940 core vs non core

2020-04-21 Thread GitBox


djencks opened a new pull request #3764:
URL: https://github.com/apache/camel/pull/3764


   This back ports the source changes for CAMEL-14874, CAMEL-14906, and 
CAMEL-14907 to the 3.2.x branch.  It also fixes the user-manual faq xrefs so 
the build can succeed. As supportLevel is not available in the 3.2.x branch, 
that column is replaced by "deprecated".



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.

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




[GitHub] [camel] davsclaus commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-21 Thread GitBox


davsclaus commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411867669



##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECEndpoint.java
##
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The splunk component allows to publish events in Splunk using the HTTP 
Event Collector.
+ */
+@UriEndpoint(firstVersion = "3.3.0", scheme = "splunk-hec", title = "Splunk 
HEC", syntax = "splunk-hec:endpoint/token", label = "log,monitoring")
+public class SplunkHECEndpoint extends DefaultEndpoint {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(SplunkHECEndpoint.class);
+private static final Pattern URI_PARSER = 
Pattern.compile("splunk-hec\\:\\/?\\/?(\\w+):(\\d+)/(\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12})\\??.*");
+
+@UriPath

Review comment:
   @UriPath must match the syntax `splunk-hec:endpoint/token`, eg having 2 
UriPath named `endpoint` and `token`. Otherwise change the syntax to 
`splunk-hec:endpointUri` to match the current @UriPath name.





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.

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




[GitHub] [camel] renjfk opened a new pull request #3763: CAMEL-14938: Added file name customization method to GroovyShellFactory for compiled classes

2020-04-21 Thread GitBox


renjfk opened a new pull request #3763:
URL: https://github.com/apache/camel/pull/3763


   Add file name customization to complied classes generated from Groovy 
expressions for debugging purposes.



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.

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




[GitHub] [camel] davsclaus commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


davsclaus commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411867389



##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECConfiguration.java
##
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+import java.net.UnknownHostException;
+
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.util.HostUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@UriParams
+public class SplunkHECConfiguration {
+private static final transient Logger LOG = 
LoggerFactory.getLogger(SplunkHECConfiguration.class);
+
+@UriParam(label = "producer")
+private String index = "camel";
+@UriParam(label = "producer")
+private String sourceType = "camel";
+@UriParam(label = "producer")
+private String source = "camel";
+@UriParam(label = "producer")
+private String host;
+@UriParam(label = "producer")
+private boolean skipTlsVerify;
+@UriParam(label = "producer")

Review comment:
   You need to specify default value in @UriParam when it has a value, also 
for the ones that has camel above.

##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECEndpoint.java
##
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The splunk component allows to publish events in Splunk using the HTTP 
Event Collector.
+ */
+@UriEndpoint(firstVersion = "3.3.0", scheme = "splunk-hec", title = "Splunk 
HEC", syntax = "splunk-hec:endpoint/token", label = "log,monitoring")
+public class SplunkHECEndpoint extends DefaultEndpoint {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(SplunkHECEndpoint.class);
+private static final Pattern URI_PARSER = 
Pattern.compile("splunk-hec\\:\\/?\\/?(\\w+):(\\d+)/(\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12})\\??.*");
+
+@UriPath

Review comment:
   @UriPath must match the syntax `splunk-hec:endpoint/token`, eg having 2 
UriPath named `endpoint` and `token`. Otherwise change the syntax to 
`splunk-hec:endpointUri` to match the current @UriParam name.





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.

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




[GitHub] [camel] atoulme commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


atoulme commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411539438



##
File path: core/camel-componentdsl/src/generated/resources/metadata.json
##
@@ -6612,6 +6612,28 @@
 "producerOnly": false,
 "lenientProperties": false
   },
+  "SplunkHecComponentBuilderFactory": {
+"kind": "component",
+"name": "splunk-hec",
+"title": "Splunk HEC",
+"description": "The splunk component allows to publish events in Splunk 
using the HTTP Event Collector.",
+"deprecated": false,
+"deprecationNote": "log,monitoring",
+"firstVersion": "3.2.0",

Review comment:
   Fixed.





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.

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




[GitHub] [camel] atoulme commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


atoulme commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411539558



##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECConfiguration.java
##
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+import java.net.UnknownHostException;
+
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.util.HostUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@UriParams
+public class SplunkHECConfiguration {
+private static final transient Logger LOG = 
LoggerFactory.getLogger(SplunkHECConfiguration.class);
+
+@UriParam(label = "producer")
+private String index = "camel";
+@UriParam(label = "producer")
+private String sourceType = "camel";
+@UriParam(label = "producer")
+private String source = "camel";
+@UriParam(label = "host")
+private String host;
+@UriParam(label = "skiptlsverify")
+private boolean skiptlsverify;

Review comment:
   Sure thing. Fixed!





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.

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




[GitHub] [camel] atoulme commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


atoulme commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411537053



##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECProducer.java
##
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+
+import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.EntityTemplate;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContextBuilder;
+
+/**
+ * The Splunk HEC producer.
+ */
+public class SplunkHECProducer extends DefaultProducer {
+private static final ObjectMapper MAPPER = new ObjectMapper();
+private SplunkHECEndpoint endpoint;
+private CloseableHttpClient httpClient;
+
+
+public SplunkHECProducer(SplunkHECEndpoint endpoint) {
+super(endpoint);
+this.endpoint = endpoint;
+}
+
+@Override
+protected void doStart() throws Exception {
+super.doStart();
+HttpClientBuilder builder = HttpClients.custom().
+setUserAgent("Camel Splunk HEC/" + 
getEndpoint().getCamelContext().getVersion()).
+setMaxConnTotal(10);
+if (endpoint.getConfiguration().isSkiptlsverify()) {
+SSLContextBuilder sslbuilder = new SSLContextBuilder();
+sslbuilder.loadTrustMaterial(null, (chain, authType) -> true);
+SSLConnectionSocketFactory sslsf = new
+SSLConnectionSocketFactory(sslbuilder.build(), 
NoopHostnameVerifier.INSTANCE);
+builder.setSSLSocketFactory(sslsf);
+}
+httpClient = builder.build();
+}
+
+@Override
+public void process(Exchange exchange) throws Exception {
+Map payload = createPayload(exchange.getIn());
+
+HttpPost httppost = new 
HttpPost((endpoint.getConfiguration().isHttps() ? "https" : "http") + "://" + 
endpoint.getSplunkURL() + "/services/collector/event");
+httppost.addHeader("Authorization", " Splunk " + endpoint.getToken());
+
+EntityTemplate entityTemplate = new EntityTemplate(outputStream -> 
MAPPER.writer().writeValue(outputStream, payload));
+
entityTemplate.setContentType(ContentType.APPLICATION_JSON.getMimeType());
+
+httppost.setEntity(entityTemplate);
+try (CloseableHttpResponse response = httpClient.execute(httppost)) {
+if (response.getStatusLine().getStatusCode() != 200) {
+ByteArrayOutputStream output = new ByteArrayOutputStream();
+response.getEntity().writeTo(output);
+
+throw new RuntimeException(response.getStatusLine().toString() 
+ "\n" + new String(output.toByteArray(), StandardCharsets.UTF_8));
+}
+}
+}
+
+@Override
+protected void doStop() throws Exception {
+super.doStop();
+httpClient.close();

Review comment:
   I'm seeing file and seda behave differently there. I think 
`super.doStop()` should be first so it logs the stop operation. If the client 
throws an exception, at least you get the log before.





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.

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




[GitHub] [camel] lburgazzoli opened a new pull request #3762: chore: replace dependencies versions with properties

2020-04-20 Thread GitBox


lburgazzoli opened a new pull request #3762:
URL: https://github.com/apache/camel/pull/3762


   [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful subject line 
and body.
   [ ] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   [ ] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   [ ] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/master/CONTRIBUTING.md



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.

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




[GitHub] [camel] lburgazzoli opened a new pull request #3761: CAMEL-14933: Remove dependencies on spring in GenerateConfigurerMojo

2020-04-20 Thread GitBox


lburgazzoli opened a new pull request #3761:
URL: https://github.com/apache/camel/pull/3761


   [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful subject line 
and body.
   [ ] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   [ ] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   [ ] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/master/CONTRIBUTING.md



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.

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




[GitHub] [camel] dmvolod commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


dmvolod commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411212681



##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECConfiguration.java
##
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+import java.net.UnknownHostException;
+
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.util.HostUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@UriParams
+public class SplunkHECConfiguration {
+private static final transient Logger LOG = 
LoggerFactory.getLogger(SplunkHECConfiguration.class);
+
+@UriParam(label = "producer")
+private String index = "camel";
+@UriParam(label = "producer")
+private String sourceType = "camel";
+@UriParam(label = "producer")
+private String source = "camel";
+@UriParam(label = "host")
+private String host;
+@UriParam(label = "skiptlsverify")
+private boolean skiptlsverify;

Review comment:
   @atoulme it would be nice to use camel case, however it's a little bit 
tautology for Camel project :) 





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.

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




[GitHub] [camel] omarsmak commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


omarsmak commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411163810



##
File path: 
components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECProducer.java
##
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec;
+
+
+import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.EntityTemplate;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContextBuilder;
+
+/**
+ * The Splunk HEC producer.
+ */
+public class SplunkHECProducer extends DefaultProducer {
+private static final ObjectMapper MAPPER = new ObjectMapper();
+private SplunkHECEndpoint endpoint;
+private CloseableHttpClient httpClient;
+
+
+public SplunkHECProducer(SplunkHECEndpoint endpoint) {
+super(endpoint);
+this.endpoint = endpoint;
+}
+
+@Override
+protected void doStart() throws Exception {
+super.doStart();
+HttpClientBuilder builder = HttpClients.custom().
+setUserAgent("Camel Splunk HEC/" + 
getEndpoint().getCamelContext().getVersion()).
+setMaxConnTotal(10);
+if (endpoint.getConfiguration().isSkiptlsverify()) {
+SSLContextBuilder sslbuilder = new SSLContextBuilder();
+sslbuilder.loadTrustMaterial(null, (chain, authType) -> true);
+SSLConnectionSocketFactory sslsf = new
+SSLConnectionSocketFactory(sslbuilder.build(), 
NoopHostnameVerifier.INSTANCE);
+builder.setSSLSocketFactory(sslsf);
+}
+httpClient = builder.build();
+}
+
+@Override
+public void process(Exchange exchange) throws Exception {
+Map payload = createPayload(exchange.getIn());
+
+HttpPost httppost = new 
HttpPost((endpoint.getConfiguration().isHttps() ? "https" : "http") + "://" + 
endpoint.getSplunkURL() + "/services/collector/event");
+httppost.addHeader("Authorization", " Splunk " + endpoint.getToken());
+
+EntityTemplate entityTemplate = new EntityTemplate(outputStream -> 
MAPPER.writer().writeValue(outputStream, payload));
+
entityTemplate.setContentType(ContentType.APPLICATION_JSON.getMimeType());
+
+httppost.setEntity(entityTemplate);
+try (CloseableHttpResponse response = httpClient.execute(httppost)) {
+if (response.getStatusLine().getStatusCode() != 200) {
+ByteArrayOutputStream output = new ByteArrayOutputStream();
+response.getEntity().writeTo(output);
+
+throw new RuntimeException(response.getStatusLine().toString() 
+ "\n" + new String(output.toByteArray(), StandardCharsets.UTF_8));
+}
+}
+}
+
+@Override
+protected void doStop() throws Exception {
+super.doStop();
+httpClient.close();

Review comment:
   Isn't better to have `httpClient.close` before `super.doStop()`?





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.

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




[GitHub] [camel] oscerd commented on a change in pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-20 Thread GitBox


oscerd commented on a change in pull request #3760:
URL: https://github.com/apache/camel/pull/3760#discussion_r411137346



##
File path: core/camel-componentdsl/src/generated/resources/metadata.json
##
@@ -6612,6 +6612,28 @@
 "producerOnly": false,
 "lenientProperties": false
   },
+  "SplunkHecComponentBuilderFactory": {
+"kind": "component",
+"name": "splunk-hec",
+"title": "Splunk HEC",
+"description": "The splunk component allows to publish events in Splunk 
using the HTTP Event Collector.",
+"deprecated": false,
+"deprecationNote": "log,monitoring",
+"firstVersion": "3.2.0",

Review comment:
   Firstversion is 3.3.0





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.

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




[GitHub] [camel] atoulme opened a new pull request #3760: [CAMEL-14932] Add new Splunk HEC component

2020-04-19 Thread GitBox


atoulme opened a new pull request #3760:
URL: https://github.com/apache/camel/pull/3760


   This adds a new component named `splunk-hec` after [Splunk 
HEC](https://dev.splunk.com/enterprise/docs/dataapps/httpeventcollector/).
   
   This allows sending data to Splunk using Apache Camel, over the HTTP Event 
Collector.
   
   The HTTP Event Collector is a simple HTTP REST endpoint where data may be 
posted with some metadata available to Splunk.



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.

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




[GitHub] [camel-examples] omarsmak merged pull request #1: Change to camel bom

2020-02-12 Thread GitBox
omarsmak merged pull request #1: Change to camel bom
URL: https://github.com/apache/camel-examples/pull/1
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-examples] davsclaus commented on issue #1: Change to camel bom

2020-02-12 Thread GitBox
davsclaus commented on issue #1: Change to camel bom
URL: https://github.com/apache/camel-examples/pull/1#issuecomment-585210233
 
 
   Yay this is very good.
   
   Later we should add the BOM to each example so the end user only have the 
pom of each example to worry about. But this is a great first step.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-examples] omarsmak opened a new pull request #1: Change to camel bom

2020-02-12 Thread GitBox
omarsmak opened a new pull request #1: Change to camel bom
URL: https://github.com/apache/camel-examples/pull/1
 
 
   This changes to Camel BOM instead of using Camel parent. Next is to move 
specific examples building tools from main camel repo to the examples repo.
   FYI @davsclaus @oscerd 


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] valdar merged pull request #6: Fixed build action schema generation error.

2020-02-11 Thread GitBox
valdar merged pull request #6: Fixed build action schema generation error.
URL: https://github.com/apache/camel-spring-boot/pull/6
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] valdar opened a new pull request #6: Fixed build action schema generation error.

2020-02-11 Thread GitBox
valdar opened a new pull request #6: Fixed build action schema generation error.
URL: https://github.com/apache/camel-spring-boot/pull/6
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] jamesnetherton merged pull request #5: CAMEL-14502: Make jsr356 websocket component work with Spring Boot embedded servers

2020-02-06 Thread GitBox
jamesnetherton merged pull request #5: CAMEL-14502: Make jsr356 websocket 
component work with Spring Boot embedded servers
URL: https://github.com/apache/camel-spring-boot/pull/5
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] jamesnetherton opened a new pull request #5: CAMEL-14502: Make jsr356 websocket component work with Spring Boot embedded servers

2020-02-06 Thread GitBox
jamesnetherton opened a new pull request #5: CAMEL-14502: Make jsr356 websocket 
component work with Spring Boot embedded servers
URL: https://github.com/apache/camel-spring-boot/pull/5
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] asfgit merged pull request #4: CAMEL-14481: camel-spring-boot: Remove camel-management to disable JM…

2020-02-05 Thread GitBox
asfgit merged pull request #4: CAMEL-14481: camel-spring-boot: Remove 
camel-management to disable JM…
URL: https://github.com/apache/camel-spring-boot/pull/4
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] PascalSchumacher commented on issue #4: CAMEL-14481: camel-spring-boot: Remove camel-management to disable JM…

2020-02-04 Thread GitBox
PascalSchumacher commented on issue #4: CAMEL-14481: camel-spring-boot: Remove 
camel-management to disable JM…
URL: https://github.com/apache/camel-spring-boot/pull/4#issuecomment-582120307
 
 
   Yes, I will add this to 
https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] davsclaus commented on issue #4: CAMEL-14481: camel-spring-boot: Remove camel-management to disable JM…

2020-02-04 Thread GitBox
davsclaus commented on issue #4: CAMEL-14481: camel-spring-boot: Remove 
camel-management to disable JM…
URL: https://github.com/apache/camel-spring-boot/pull/4#issuecomment-582118095
 
 
   Can you add a note in the camel 3 upgrade guide. The doc is in the main repo 
under docs


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] PascalSchumacher opened a new pull request #4: CAMEL-14481: camel-spring-boot: Remove camel-management to disable JM…

2020-02-04 Thread GitBox
PascalSchumacher opened a new pull request #4: CAMEL-14481: camel-spring-boot: 
Remove camel-management to disable JM…
URL: https://github.com/apache/camel-spring-boot/pull/4
 
 
   …X by default
   
   Test and examples will not be able to detect anything broken by this change 
because `camel-test-spring` has a dependency on `camel-management`.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] asfgit merged pull request #3: CAMEL-14471: camel-spring-boot: Disable proxying of bean methods for auto-configuration classes

2020-02-04 Thread GitBox
asfgit merged pull request #3: CAMEL-14471: camel-spring-boot: Disable proxying 
of bean methods for auto-configuration classes
URL: https://github.com/apache/camel-spring-boot/pull/3
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] PascalSchumacher commented on issue #3: CAMEL-14471: camel-spring-boot: Disable proxying of bean methods for auto-configuration classes

2020-02-02 Thread GitBox
PascalSchumacher commented on issue #3: CAMEL-14471: camel-spring-boot: Disable 
proxying of bean methods for auto-configuration classes
URL: https://github.com/apache/camel-spring-boot/pull/3#issuecomment-581153165
 
 
   Examples also still work with this change.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-spring-boot] PascalSchumacher edited a comment on issue #3: WIP: CAMEL-14471: camel-spring-boot: Disable proxying of bean methods for auto-configuration classes

2020-02-02 Thread GitBox
PascalSchumacher edited a comment on issue #3: WIP: CAMEL-14471: 
camel-spring-boot: Disable proxying of bean methods for auto-configuration 
classes
URL: https://github.com/apache/camel-spring-boot/pull/3#issuecomment-581144291
 
 
   > Is the integration tests going well?
   
   Running a full build all unit tests and almost all integration tests passed.
   
   Three integration tests failed:
   
   >org.apache.camel.itest.springboot.CamelAwsLambdaTest  Time elapsed: 5.214 
sec  <<< ERROR!
   java.lang.RuntimeException: Could not invoke deployment method: public 
static org.jboss.shrinkwrap.api.Archive 
org.apache.camel.itest.springboot.CamelAwsLambdaTest.createSpringBootPackage() 
throws java.lang.Exception
at 
org.apache.camel.itest.springboot.CamelAwsLambdaTest.createSpringBootPackage(CamelAwsLambdaTest.java:32)
   Caused by: java.io.FileNotFoundException: 
C:\Users\User\camel-spring-boot\camel-itest-spring-boot\..\components-starter\camel-aws-lambda-starter\pom.xml
 (Das System kann die angegebene Datei nicht finden)
at 
org.apache.camel.itest.springboot.CamelAwsLambdaTest.createSpringBootPackage(CamelAwsLambdaTest.java:32)
   
   >org.apache.camel.itest.springboot.CamelAwsMqTest  Time elapsed: 4.75 sec  
<<< ERROR!
   java.lang.RuntimeException: Could not invoke deployment method: public 
static org.jboss.shrinkwrap.api.Archive 
org.apache.camel.itest.springboot.CamelAwsMqTest.createSpringBootPackage() 
throws java.lang.Exception
at 
org.apache.camel.itest.springboot.CamelAwsMqTest.createSpringBootPackage(CamelAwsMqTest.java:32)
   Caused by: java.io.FileNotFoundException: 
C:\Users\User\camel-spring-boot\camel-itest-spring-boot\..\components-starter\camel-aws-mq-starter\pom.xml
 (Das System kann die angegebene Datei nicht finden)
at 
org.apache.camel.itest.springboot.CamelAwsMqTest.createSpringBootPackage(CamelAwsMqTest.java:32)
   
   >org.apache.camel.itest.springboot.CamelAwsMskTest  Time elapsed: 4.48 sec  
<<< ERROR!
   java.lang.RuntimeException: Could not invoke deployment method: public 
static org.jboss.shrinkwrap.api.Archive 
org.apache.camel.itest.springboot.CamelAwsMskTest.createSpringBootPackage() 
throws java.lang.Exception
at 
org.apache.camel.itest.springboot.CamelAwsMskTest.createSpringBootPackage(CamelAwsMskTest.java:32)
   Caused by: java.io.FileNotFoundException: 
C:\Users\User\camel-spring-boot\camel-itest-spring-boot\..\components-starter\camel-aws-msk-starter\pom.xml
 (Das System kann die angegebene Datei nicht finden)
at 
org.apache.camel.itest.springboot.CamelAwsMskTest.createSpringBootPackage(CamelAwsMskTest.java:32)
   
   I guess these failures are not caused by this change, but by the platform I 
ran the test on (Windows, OpenJDK 11, OpenJ9). Most propably Windows.
   
   Edit:
   If I run just one of the three failed tests mentioned above it passes.
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


  1   2   3   4   5   6   7   8   9   10   >