This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 8101887dc03352442f308358246409e425a9e441 Author: nicolaferraro <ni.ferr...@gmail.com> AuthorDate: Wed Jan 12 13:50:25 2022 +0100 Add KEDA markers to some Kamelets --- .../ROOT/assets/images/kamelets/delay-action.svg | 1 - docs/modules/ROOT/nav.adoc | 157 +------------------- docs/modules/ROOT/pages/delay-action.adoc | 160 --------------------- docs/{modules/ROOT => }/pages/index.adoc | 0 kamelets/aws-sqs-source.kamelet.yaml | 15 ++ kamelets/kafka-not-secured-source.kamelet.yaml | 12 ++ kamelets/kafka-source.kamelet.yaml | 18 +++ .../kamelets/catalog/KameletsCatalogTest.java | 2 +- .../resources/kamelets/aws-sqs-source.kamelet.yaml | 15 ++ .../kamelets/kafka-not-secured-source.kamelet.yaml | 12 ++ .../resources/kamelets/kafka-source.kamelet.yaml | 18 +++ script/validator/validator.go | 15 ++ 12 files changed, 107 insertions(+), 318 deletions(-) diff --git a/docs/modules/ROOT/assets/images/kamelets/delay-action.svg b/docs/modules/ROOT/assets/images/kamelets/delay-action.svg deleted file mode 100644 index 7888f41..0000000 --- a/docs/modules/ROOT/assets/images/kamelets/delay-action.svg +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.88 100.6" style="enable-background:new 0 0 122.88 100.6" xml:space="preserve"><style type="text/css">.st0{fill:#272727;} .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#D8453E;}</style><g><path class="st0" d="M72.58,0c6.8,0,13.3,1.36,19.23,3.81c6.16,2.55,11.7,6.29,16.33,10.92l0,0c4.63,4.63,8.37,10.17,10.92,16.3 [...] \ No newline at end of file diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 22387eb..4bdeb40 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,5 +1,4 @@ // THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT -<<<<<<< HEAD * xref:avro-deserialize-action.adoc[] * xref:avro-serialize-action.adoc[] * xref:aws-cloudwatch-sink.adoc[] @@ -38,6 +37,7 @@ * xref:chunk-template-action.adoc[] * xref:couchbase-sink.adoc[] * xref:cron-source.adoc[] +* xref:delay-action.adoc[] * xref:dns-dig-action.adoc[] * xref:dns-ip-action.adoc[] * xref:dns-lookup-action.adoc[] @@ -161,159 +161,4 @@ * xref:wttrin-source.adoc[] * xref:xj-identity-action.adoc[] * xref:xj-template-action.adoc[] -======= -* xref:ROOT:avro-deserialize-action.adoc[image:kamelets/avro-deserialize-action.svg[] Avro Deserialize Action] -* xref:ROOT:avro-serialize-action.adoc[image:kamelets/avro-serialize-action.svg[] Avro Serialize Action] -* xref:ROOT:aws-cloudwatch-sink.adoc[image:kamelets/aws-cloudwatch-sink.svg[] AWS CloudWatch Metrics Sink] -* xref:ROOT:aws-ddb-streams-source.adoc[image:kamelets/aws-ddb-streams-source.svg[] AWS DynamoDB Streams Source] -* xref:ROOT:aws-ec2-sink.adoc[image:kamelets/aws-ec2-sink.svg[] AWS EC2 Sink] -* xref:ROOT:aws-kinesis-firehose-sink.adoc[image:kamelets/aws-kinesis-firehose-sink.svg[] AWS Kinesis Firehose Sink] -* xref:ROOT:aws-kinesis-sink.adoc[image:kamelets/aws-kinesis-sink.svg[] AWS Kinesis Sink] -* xref:ROOT:aws-kinesis-source.adoc[image:kamelets/aws-kinesis-source.svg[] AWS Kinesis Source] -* xref:ROOT:aws-lambda-sink.adoc[image:kamelets/aws-lambda-sink.svg[] AWS Lambda Sink] -* xref:ROOT:aws-redshift-sink.adoc[image:kamelets/aws-redshift-sink.svg[] AWS Redshift Sink] -* xref:ROOT:aws-redshift-source.adoc[image:kamelets/aws-redshift-source.svg[] AWS Redshift Source] -* xref:ROOT:aws-s3-sink.adoc[image:kamelets/aws-s3-sink.svg[] AWS S3 Sink] -* xref:ROOT:aws-s3-source.adoc[image:kamelets/aws-s3-source.svg[] AWS S3 Source] -* xref:ROOT:aws-s3-streaming-upload-sink.adoc[image:kamelets/aws-s3-streaming-upload-sink.svg[] AWS S3 Streaming upload Sink] -* xref:ROOT:aws-secrets-manager-sink.adoc[image:kamelets/aws-secrets-manager-sink.svg[] AWS Secrets Manager Sink] -* xref:ROOT:aws-sns-fifo-sink.adoc[image:kamelets/aws-sns-fifo-sink.svg[] AWS SNS FIFO Sink] -* xref:ROOT:aws-sns-sink.adoc[image:kamelets/aws-sns-sink.svg[] AWS SNS Sink] -* xref:ROOT:aws-sqs-batch-sink.adoc[image:kamelets/aws-sqs-batch-sink.svg[] AWS SQS Batch Sink] -* xref:ROOT:aws-sqs-fifo-sink.adoc[image:kamelets/aws-sqs-fifo-sink.svg[] AWS SQS FIFO Sink] -* xref:ROOT:aws-sqs-sink.adoc[image:kamelets/aws-sqs-sink.svg[] AWS SQS Sink] -* xref:ROOT:aws-sqs-source.adoc[image:kamelets/aws-sqs-source.svg[] AWS SQS Source] -* xref:ROOT:aws-translate-action.adoc[image:kamelets/aws-translate-action.svg[] AWS Translate Action] -* xref:ROOT:azure-cosmosdb-source.adoc[image:kamelets/azure-cosmosdb-source.svg[] Azure CosmosDB Source] -* xref:ROOT:azure-eventhubs-sink.adoc[image:kamelets/azure-eventhubs-sink.svg[] Azure Eventhubs Sink] -* xref:ROOT:azure-eventhubs-source.adoc[image:kamelets/azure-eventhubs-source.svg[] Azure Eventhubs Source] -* xref:ROOT:azure-storage-blob-sink.adoc[image:kamelets/azure-storage-blob-sink.svg[] Azure Storage Blob Sink] -* xref:ROOT:azure-storage-blob-source.adoc[image:kamelets/azure-storage-blob-source.svg[] Azure Storage Blob Source] -* xref:ROOT:azure-storage-queue-sink.adoc[image:kamelets/azure-storage-queue-sink.svg[] Azure Storage Queue Sink] -* xref:ROOT:azure-storage-queue-source.adoc[image:kamelets/azure-storage-queue-source.svg[] Azure Storage Queue Source] -* xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source] -* xref:ROOT:caffeine-action.adoc[image:kamelets/caffeine-action.svg[] Caffeine Action] -* xref:ROOT:cassandra-sink.adoc[image:kamelets/cassandra-sink.svg[] Cassandra Sink] -* xref:ROOT:cassandra-source.adoc[image:kamelets/cassandra-source.svg[] Cassandra Source] -* xref:ROOT:chuck-norris-source.adoc[image:kamelets/chuck-norris-source.svg[] Chuck Norris Source] -* xref:ROOT:chunk-template-action.adoc[image:kamelets/chunk-template-action.svg[] Chunk Template Action] -* xref:ROOT:couchbase-sink.adoc[image:kamelets/couchbase-sink.svg[] Couchbase Sink] -* xref:ROOT:cron-source.adoc[image:kamelets/cron-source.svg[] Cron Source] -* xref:ROOT:delay-action.adoc[image:kamelets/delay-action.svg[] Delay Action] -* xref:ROOT:dns-dig-action.adoc[image:kamelets/dns-dig-action.svg[] DNS DIG Action] -* xref:ROOT:dns-ip-action.adoc[image:kamelets/dns-ip-action.svg[] DNS IP Action] -* xref:ROOT:dns-lookup-action.adoc[image:kamelets/dns-lookup-action.svg[] DNS Lookup Action] -* xref:ROOT:dropbox-sink.adoc[image:kamelets/dropbox-sink.svg[] Dropbox Sink] -* xref:ROOT:dropbox-source.adoc[image:kamelets/dropbox-source.svg[] Dropbox Source] -* xref:ROOT:earthquake-source.adoc[image:kamelets/earthquake-source.svg[] Earthquake Source] -* xref:ROOT:elasticsearch-index-sink.adoc[image:kamelets/elasticsearch-index-sink.svg[] ElasticSearch Index Sink] -* xref:ROOT:elasticsearch-search-source.adoc[image:kamelets/elasticsearch-search-source.svg[] ElasticSearch Search Source] -* xref:ROOT:exec-sink.adoc[image:kamelets/exec-sink.svg[] Exec Sink] -* xref:ROOT:extract-field-action.adoc[image:kamelets/extract-field-action.svg[] Extract Field Action] -* xref:ROOT:fhir-source.adoc[image:kamelets/fhir-source.svg[] Fhir Source] -* xref:ROOT:file-watch-source.adoc[image:kamelets/file-watch-source.svg[] File Watch Source] -* xref:ROOT:freemarker-template-action.adoc[image:kamelets/freemarker-template-action.svg[] Freemarker Template Action] -* xref:ROOT:ftp-sink.adoc[image:kamelets/ftp-sink.svg[] FTP Sink] -* xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source] -* xref:ROOT:ftps-sink.adoc[image:kamelets/ftps-sink.svg[] FTPS Sink] -* xref:ROOT:ftps-source.adoc[image:kamelets/ftps-source.svg[] FTPS Source] -* xref:ROOT:github-source.adoc[image:kamelets/github-source.svg[] Github Source] -* xref:ROOT:google-calendar-source.adoc[image:kamelets/google-calendar-source.svg[] Google Calendar Source] -* xref:ROOT:google-mail-source.adoc[image:kamelets/google-mail-source.svg[] Google Mail Source] -* xref:ROOT:google-pubsub-sink.adoc[image:kamelets/google-pubsub-sink.svg[] Google Pubsub Sink] -* xref:ROOT:google-pubsub-source.adoc[image:kamelets/google-pubsub-source.svg[] Google Pubsub Source] -* xref:ROOT:google-sheets-source.adoc[image:kamelets/google-sheets-source.svg[] Google Sheets Source] -* xref:ROOT:has-header-filter-action.adoc[image:kamelets/has-header-filter-action.svg[] Has Header Filter Action] -* xref:ROOT:header-matches-filter-action.adoc[image:kamelets/header-matches-filter-action.svg[] Header Matches Filter Action] -* xref:ROOT:hoist-field-action.adoc[image:kamelets/hoist-field-action.svg[] Hoist Field Action] -* xref:ROOT:http-secured-sink.adoc[image:kamelets/http-secured-sink.svg[] Secured HTTP Sink] -* xref:ROOT:http-secured-source.adoc[image:kamelets/http-secured-source.svg[] HTTP Secured Source] -* xref:ROOT:http-sink.adoc[image:kamelets/http-sink.svg[] HTTP Sink] -* xref:ROOT:http-source.adoc[image:kamelets/http-source.svg[] HTTP Source] -* xref:ROOT:infinispan-sink.adoc[image:kamelets/infinispan-sink.svg[] Infinispan Sink] -* xref:ROOT:infinispan-source.adoc[image:kamelets/infinispan-source.svg[] Infinispan Source] -* xref:ROOT:insert-field-action.adoc[image:kamelets/insert-field-action.svg[] Insert Field Action] -* xref:ROOT:insert-header-action.adoc[image:kamelets/insert-header-action.svg[] Insert Header Action] -* xref:ROOT:is-tombstone-filter-action.adoc[image:kamelets/is-tombstone-filter-action.svg[] Is Tombstone Filter Action] -* xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source] -* xref:ROOT:jms-amqp-10-sink.adoc[image:kamelets/jms-amqp-10-sink.svg[] JMS - AMQP 1.0 Kamelet Sink] -* xref:ROOT:jms-amqp-10-source.adoc[image:kamelets/jms-amqp-10-source.svg[] JMS - AMQP 1.0 Kamelet Source] -* xref:ROOT:jms-apache-artemis-sink.adoc[image:kamelets/jms-apache-artemis-sink.svg[] JMS - Apache Artemis Kamelet Sink] -* xref:ROOT:jms-apache-artemis-source.adoc[image:kamelets/jms-apache-artemis-source.svg[] JMS - Apache Artemis Kamelet Source] -* xref:ROOT:jolt-transformation-action.adoc[image:kamelets/jolt-transformation-action.svg[] Jolt Transformation Action] -* xref:ROOT:json-deserialize-action.adoc[image:kamelets/json-deserialize-action.svg[] Json Deserialize Action] -* xref:ROOT:json-schema-validator-action.adoc[image:kamelets/json-schema-validator-action.svg[] Json Schema Validator Action] -* xref:ROOT:json-serialize-action.adoc[image:kamelets/json-serialize-action.svg[] Json Serialize Action] -* xref:ROOT:jsonata-action.adoc[image:kamelets/jsonata-action.svg[] Jsonata Action] -* xref:ROOT:kafka-manual-commit-action.adoc[image:kamelets/kafka-manual-commit-action.svg[] Kafka Manual Commit Action] -* xref:ROOT:kafka-not-secured-sink.adoc[image:kamelets/kafka-not-secured-sink.svg[] Kafka Not Secured Sink] -* xref:ROOT:kafka-not-secured-source.adoc[image:kamelets/kafka-not-secured-source.svg[] Kafka Not Secured Source] -* xref:ROOT:kafka-sink.adoc[image:kamelets/kafka-sink.svg[] Kafka Sink] -* xref:ROOT:kafka-source.adoc[image:kamelets/kafka-source.svg[] Kafka Source] -* xref:ROOT:kubernetes-namespaces-source.adoc[image:kamelets/kubernetes-namespaces-source.svg[] Kubernetes Namespaces Source] -* xref:ROOT:kubernetes-nodes-source.adoc[image:kamelets/kubernetes-nodes-source.svg[] Kubernetes Nodes Source] -* xref:ROOT:kubernetes-pods-source.adoc[image:kamelets/kubernetes-pods-source.svg[] Kubernetes Pods Source] -* xref:ROOT:log-sink.adoc[image:kamelets/log-sink.svg[] Log Sink] -* xref:ROOT:mail-imap-source.adoc[image:kamelets/mail-imap-source.svg[] Mail IMAP Source] -* xref:ROOT:mail-sink.adoc[image:kamelets/mail-sink.svg[] Mail Sink] -* xref:ROOT:mariadb-sink.adoc[image:kamelets/mariadb-sink.svg[] MariaDB Sink] -* xref:ROOT:mariadb-source.adoc[image:kamelets/mariadb-source.svg[] MariaDB Source] -* xref:ROOT:mask-field-action.adoc[image:kamelets/mask-field-action.svg[] Mask Fields Action] -* xref:ROOT:message-timestamp-router-action.adoc[image:kamelets/message-timestamp-router-action.svg[] Message Timestamp Router Action] -* xref:ROOT:minio-sink.adoc[image:kamelets/minio-sink.svg[] Minio Sink] -* xref:ROOT:minio-source.adoc[image:kamelets/minio-source.svg[] Minio Source] -* xref:ROOT:mongodb-sink.adoc[image:kamelets/mongodb-sink.svg[] MongoDB Sink] -* xref:ROOT:mongodb-source.adoc[image:kamelets/mongodb-source.svg[] MongoDB Source] -* xref:ROOT:mqtt-sink.adoc[image:kamelets/mqtt-sink.svg[] MQTT Sink] -* xref:ROOT:mqtt-source.adoc[image:kamelets/mqtt-source.svg[] MQTT Source] -* xref:ROOT:mustache-template-action.adoc[image:kamelets/mustache-template-action.svg[] Mustache Template Action] -* xref:ROOT:mvel-template-action.adoc[image:kamelets/mvel-template-action.svg[] Mvel Template Action] -* xref:ROOT:mysql-sink.adoc[image:kamelets/mysql-sink.svg[] MySQL Sink] -* xref:ROOT:mysql-source.adoc[image:kamelets/mysql-source.svg[] MySQL Source] -* xref:ROOT:nats-sink.adoc[image:kamelets/nats-sink.svg[] NATS Sink] -* xref:ROOT:nats-source.adoc[image:kamelets/nats-source.svg[] NATS Source] -* xref:ROOT:openai-classification-action.adoc[image:kamelets/openai-classification-action.svg[] OpenAI Classification Action] -* xref:ROOT:openai-completion-action.adoc[image:kamelets/openai-completion-action.svg[] OpenAI Completion Action] -* xref:ROOT:pdf-action.adoc[image:kamelets/pdf-action.svg[] PDF Action] -* xref:ROOT:postgresql-sink.adoc[image:kamelets/postgresql-sink.svg[] PostgreSQL Sink] -* xref:ROOT:postgresql-source.adoc[image:kamelets/postgresql-source.svg[] PostgreSQL Source] -* xref:ROOT:predicate-filter-action.adoc[image:kamelets/predicate-filter-action.svg[] Predicate Filter Action] -* xref:ROOT:protobuf-deserialize-action.adoc[image:kamelets/protobuf-deserialize-action.svg[] Protobuf Deserialize Action] -* xref:ROOT:protobuf-serialize-action.adoc[image:kamelets/protobuf-serialize-action.svg[] Protobuf Serialize Action] -* xref:ROOT:pulsar-sink.adoc[image:kamelets/pulsar-sink.svg[] Pulsar Sink] -* xref:ROOT:pulsar-source.adoc[image:kamelets/pulsar-source.svg[] Pulsar Source] -* xref:ROOT:rabbitmq-source.adoc[image:kamelets/rabbitmq-source.svg[] RabbitMQ Source] -* xref:ROOT:redis-sink.adoc[image:kamelets/redis-sink.svg[] Redis Sink] -* xref:ROOT:redis-source.adoc[image:kamelets/redis-source.svg[] Redis Source] -* xref:ROOT:regex-router-action.adoc[image:kamelets/regex-router-action.svg[] Regex Router Action] -* xref:ROOT:replace-field-action.adoc[image:kamelets/replace-field-action.svg[] Replace Field Action] -* xref:ROOT:salesforce-source.adoc[image:kamelets/salesforce-source.svg[] Salesforce Source] -* xref:ROOT:sftp-sink.adoc[image:kamelets/sftp-sink.svg[] SFTP Sink] -* xref:ROOT:sftp-source.adoc[image:kamelets/sftp-source.svg[] SFTP Source] -* xref:ROOT:slack-sink.adoc[image:kamelets/slack-sink.svg[] Slack Sink] -* xref:ROOT:slack-source.adoc[image:kamelets/slack-source.svg[] Slack Source] -* xref:ROOT:solr-sink.adoc[image:kamelets/solr-sink.svg[] Solr Sink] -* xref:ROOT:solr-source.adoc[image:kamelets/solr-source.svg[] Solr Source] -* xref:ROOT:sqlserver-sink.adoc[image:kamelets/sqlserver-sink.svg[] Microsoft SQL Server Sink] -* xref:ROOT:sqlserver-source.adoc[image:kamelets/sqlserver-source.svg[] Microsoft SQL Server Source] -* xref:ROOT:ssh-sink.adoc[image:kamelets/ssh-sink.svg[] SSH Sink] -* xref:ROOT:ssh-source.adoc[image:kamelets/ssh-source.svg[] SSH Source] -* xref:ROOT:string-template-action.adoc[image:kamelets/string-template-action.svg[] String Template Action] -* xref:ROOT:telegram-sink.adoc[image:kamelets/telegram-sink.svg[] Telegram Sink] -* xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram Source] -* xref:ROOT:throttle-action.adoc[image:kamelets/throttle-action.svg[] Throttle Action] -* xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source] -* xref:ROOT:timestamp-router-action.adoc[image:kamelets/timestamp-router-action.svg[] Timestamp Router Action] -* xref:ROOT:topic-name-matches-filter-action.adoc[image:kamelets/topic-name-matches-filter-action.svg[] Kafka Topic Name Matches Filter Action] -* xref:ROOT:twitter-directmessage-source.adoc[image:kamelets/twitter-directmessage-source.svg[] Twitter Direct Message Source] -* xref:ROOT:twitter-search-source.adoc[image:kamelets/twitter-search-source.svg[] Twitter Search Source] -* xref:ROOT:twitter-timeline-source.adoc[image:kamelets/twitter-timeline-source.svg[] Twitter Timeline Source] -* xref:ROOT:value-to-key-action.adoc[image:kamelets/value-to-key-action.svg[] Value to Key Action] -* xref:ROOT:velocity-template-action.adoc[image:kamelets/velocity-template-action.svg[] Velocity Template Action] -* xref:ROOT:webhook-source.adoc[image:kamelets/webhook-source.svg[] Webhook Source] -* xref:ROOT:websocket-source.adoc[image:kamelets/websocket-source.svg[] Websocket Source] -* xref:ROOT:wttrin-source.adoc[image:kamelets/wttrin-source.svg[] wttr.in Source] -* xref:ROOT:xj-identity-action.adoc[image:kamelets/xj-identity-action.svg[] XJ Identity Action] -* xref:ROOT:xj-template-action.adoc[image:kamelets/xj-template-action.svg[] XJ Template Action] ->>>>>>> 99266ed (Add delay action) // THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/delay-action.adoc b/docs/modules/ROOT/pages/delay-action.adoc deleted file mode 100644 index 5fd1566..0000000 --- a/docs/modules/ROOT/pages/delay-action.adoc +++ /dev/null @@ -1,160 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT - -= image:kamelets/delay-action.svg[] Delay Action - -*Provided by: "Apache Software Foundation"* - -*Support Level for this Kamelet is: "Preview"* - -Delay the processing using a specific amount of time - -== Configuration Options - -The following table summarizes the configuration options available for the `delay-action` Kamelet: -[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] -|=== -| Property| Name| Description| Type| Default| Example -| *milliseconds {empty}* *| Milliseconds| The number of milliseconds of delay| integer| | `1000` -|=== - -NOTE: Fields marked with an asterisk ({empty}*) are mandatory. - - -== Dependencies - -At runtime, the `delay-action` Kamelet relies upon the presence of the following dependencies: - -- camel:core -- camel:kamelet - -== Usage - -This section describes how you can use the `delay-action`. - -=== Knative Action - -You can use the `delay-action` Kamelet as an intermediate step in a Knative binding. - -.delay-action-binding.yaml -[source,yaml] ----- -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: delay-action-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: timer-source - properties: - message: "Hello" - steps: - - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: delay-action - properties: - milliseconds: 1000 - sink: - ref: - kind: Channel - apiVersion: messaging.knative.dev/v1 - name: mychannel - ----- - -==== *Prerequisite* - -You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster. - -==== *Procedure for using the cluster CLI* - -. Save the `delay-action-binding.yaml` file to your local drive, and then edit it as needed for your configuration. - -. Run the action by using the following command: -+ -[source,shell] ----- -kubectl apply -f delay-action-binding.yaml ----- - -==== *Procedure for using the Kamel CLI* - -Configure and run the action by using the following command: - -[source,shell] ----- -kamel bind timer-source?message=Hello --step delay-action -p step-0.milliseconds=1000 channel:mychannel ----- - -This command creates the KameletBinding in the current namespace on the cluster. - -=== Kafka Action - -You can use the `delay-action` Kamelet as an intermediate step in a Kafka binding. - -.delay-action-binding.yaml -[source,yaml] ----- -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: delay-action-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: timer-source - properties: - message: "Hello" - steps: - - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: delay-action - properties: - milliseconds: 1000 - sink: - ref: - kind: KafkaTopic - apiVersion: kafka.strimzi.io/v1beta1 - name: my-topic - ----- - -==== *Prerequisites* - -* You've installed https://strimzi.io/[Strimzi]. -* You've created a topic named `my-topic` in the current namespace. -* You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster. - -==== *Procedure for using the cluster CLI* - -. Save the `delay-action-binding.yaml` file to your local drive, and then edit it as needed for your configuration. - -. Run the action by using the following command: -+ -[source,shell] ----- -kubectl apply -f delay-action-binding.yaml ----- - -==== *Procedure for using the Kamel CLI* - -Configure and run the action by using the following command: - -[source,shell] ----- -kamel bind timer-source?message=Hello --step delay-action -p step-0.milliseconds=1000 kafka.strimzi.io/v1beta1:KafkaTopic:my-topic ----- - -This command creates the KameletBinding in the current namespace on the cluster. - -== Kamelet source file - -https://github.com/apache/camel-kamelets/blob/main/kamelets/delay-action.kamelet.yaml - -// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/pages/index.adoc similarity index 100% rename from docs/modules/ROOT/pages/index.adoc rename to docs/pages/index.adoc diff --git a/kamelets/aws-sqs-source.kamelet.yaml b/kamelets/aws-sqs-source.kamelet.yaml index 4122bb1..1f8c553 100644 --- a/kamelets/aws-sqs-source.kamelet.yaml +++ b/kamelets/aws-sqs-source.kamelet.yaml @@ -25,6 +25,7 @@ metadata: camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...] camel.apache.org/provider: "Apache Software Foundation" camel.apache.org/kamelet.group: "AWS SQS" + camel.apache.org/keda.type: "aws-sqs-queue" labels: camel.apache.org/kamelet.type: "source" spec: @@ -58,6 +59,8 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password - urn:camel:group:credentials + - urn:keda:authentication:awsAccessKeyID + - urn:keda:required secretKey: title: Secret Key description: The secret key obtained from AWS @@ -66,11 +69,16 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password - urn:camel:group:credentials + - urn:keda:authentication:awsSecretAccessKey + - urn:keda:required region: title: AWS Region description: The AWS region to connect to type: string example: eu-west-1 + x-descriptors: + - urn:keda:metadata:awsRegion + - urn:keda:required autoCreateQueue: title: Autocreate Queue description: Setting the autocreation of the SQS queue. @@ -88,6 +96,13 @@ spec: type: string example: http or https default: https + queueURL: + title: Queue URL + description: The full SQS Queue URL (required if using KEDA) + type: string + x-descriptors: + - urn:keda:metadata:queueURL + - urn:keda:required dependencies: - "camel:aws2-sqs" - "camel:kamelet" diff --git a/kamelets/kafka-not-secured-source.kamelet.yaml b/kamelets/kafka-not-secured-source.kamelet.yaml index adc52f8..b7c4f50 100644 --- a/kamelets/kafka-not-secured-source.kamelet.yaml +++ b/kamelets/kafka-not-secured-source.kamelet.yaml @@ -24,6 +24,7 @@ metadata: camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MD [...] camel.apache.org/provider: "Apache Software Foundation" camel.apache.org/kamelet.group: "Kafka" + camel.apache.org/keda.type: "kafka" labels: camel.apache.org/kamelet.type: "source" spec: @@ -40,10 +41,16 @@ spec: title: Topic Names description: Comma separated list of Kafka topic names type: string + x-descriptors: + - urn:keda:metadata:topic + - urn:keda:required bootstrapServers: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string + x-descriptors: + - urn:keda:metadata:bootstrapServers + - urn:keda:required autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -68,11 +75,16 @@ spec: description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none type: string default: "latest" + x-descriptors: + - urn:keda:metadata:offsetResetPolicy consumerGroup: title: Consumer Group description: A string that uniquely identifies the group of consumers to which this source belongs type: string example: "my-group-id" + x-descriptors: + - urn:keda:metadata:consumerGroup + - urn:keda:required dependencies: - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-source.kamelet.yaml b/kamelets/kafka-source.kamelet.yaml index 8167e8a..9d9cc9f 100644 --- a/kamelets/kafka-source.kamelet.yaml +++ b/kamelets/kafka-source.kamelet.yaml @@ -24,6 +24,9 @@ metadata: camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MD [...] camel.apache.org/provider: "Apache Software Foundation" camel.apache.org/kamelet.group: "Kafka" + camel.apache.org/keda.type: "kafka" + camel.apache.org/keda.authentication.sasl: "plaintext" + camel.apache.org/keda.authentication.tls: "enable" labels: camel.apache.org/kamelet.type: "source" spec: @@ -42,10 +45,16 @@ spec: title: Topic Names description: Comma separated list of Kafka topic names type: string + x-descriptors: + - urn:keda:metadata:topic + - urn:keda:required bootstrapServers: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string + x-descriptors: + - urn:keda:metadata:bootstrapServers + - urn:keda:required securityProtocol: title: Security Protocol description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported @@ -62,6 +71,8 @@ spec: type: string x-descriptors: - urn:camel:group:credentials + - urn:keda:authentication:username + - urn:keda:required password: title: Password description: Password to authenticate to kafka @@ -70,6 +81,8 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password - urn:camel:group:credentials + - urn:keda:authentication:password + - urn:keda:required autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -94,11 +107,16 @@ spec: description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none type: string default: "latest" + x-descriptors: + - urn:keda:metadata:offsetResetPolicy consumerGroup: title: Consumer Group description: A string that uniquely identifies the group of consumers to which this source belongs type: string example: "my-group-id" + x-descriptors: + - urn:keda:metadata:consumerGroup + - urn:keda:required dependencies: - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java index 3cde5be..6e3cb9f 100644 --- a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java +++ b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java @@ -56,7 +56,7 @@ public class KameletsCatalogTest { @Test void testGetKameletsDefinition() throws Exception { JSONSchemaProps props = catalog.getKameletDefinition("aws-sqs-source"); - assertEquals(8, props.getProperties().keySet().size()); + assertEquals(9, props.getProperties().keySet().size()); assertTrue(props.getProperties().keySet().contains("queueNameOrArn")); } diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml index 4122bb1..1f8c553 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml @@ -25,6 +25,7 @@ metadata: camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...] camel.apache.org/provider: "Apache Software Foundation" camel.apache.org/kamelet.group: "AWS SQS" + camel.apache.org/keda.type: "aws-sqs-queue" labels: camel.apache.org/kamelet.type: "source" spec: @@ -58,6 +59,8 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password - urn:camel:group:credentials + - urn:keda:authentication:awsAccessKeyID + - urn:keda:required secretKey: title: Secret Key description: The secret key obtained from AWS @@ -66,11 +69,16 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password - urn:camel:group:credentials + - urn:keda:authentication:awsSecretAccessKey + - urn:keda:required region: title: AWS Region description: The AWS region to connect to type: string example: eu-west-1 + x-descriptors: + - urn:keda:metadata:awsRegion + - urn:keda:required autoCreateQueue: title: Autocreate Queue description: Setting the autocreation of the SQS queue. @@ -88,6 +96,13 @@ spec: type: string example: http or https default: https + queueURL: + title: Queue URL + description: The full SQS Queue URL (required if using KEDA) + type: string + x-descriptors: + - urn:keda:metadata:queueURL + - urn:keda:required dependencies: - "camel:aws2-sqs" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml index adc52f8..b7c4f50 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml @@ -24,6 +24,7 @@ metadata: camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MD [...] camel.apache.org/provider: "Apache Software Foundation" camel.apache.org/kamelet.group: "Kafka" + camel.apache.org/keda.type: "kafka" labels: camel.apache.org/kamelet.type: "source" spec: @@ -40,10 +41,16 @@ spec: title: Topic Names description: Comma separated list of Kafka topic names type: string + x-descriptors: + - urn:keda:metadata:topic + - urn:keda:required bootstrapServers: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string + x-descriptors: + - urn:keda:metadata:bootstrapServers + - urn:keda:required autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -68,11 +75,16 @@ spec: description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none type: string default: "latest" + x-descriptors: + - urn:keda:metadata:offsetResetPolicy consumerGroup: title: Consumer Group description: A string that uniquely identifies the group of consumers to which this source belongs type: string example: "my-group-id" + x-descriptors: + - urn:keda:metadata:consumerGroup + - urn:keda:required dependencies: - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml index 8167e8a..9d9cc9f 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml @@ -24,6 +24,9 @@ metadata: camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MD [...] camel.apache.org/provider: "Apache Software Foundation" camel.apache.org/kamelet.group: "Kafka" + camel.apache.org/keda.type: "kafka" + camel.apache.org/keda.authentication.sasl: "plaintext" + camel.apache.org/keda.authentication.tls: "enable" labels: camel.apache.org/kamelet.type: "source" spec: @@ -42,10 +45,16 @@ spec: title: Topic Names description: Comma separated list of Kafka topic names type: string + x-descriptors: + - urn:keda:metadata:topic + - urn:keda:required bootstrapServers: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string + x-descriptors: + - urn:keda:metadata:bootstrapServers + - urn:keda:required securityProtocol: title: Security Protocol description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported @@ -62,6 +71,8 @@ spec: type: string x-descriptors: - urn:camel:group:credentials + - urn:keda:authentication:username + - urn:keda:required password: title: Password description: Password to authenticate to kafka @@ -70,6 +81,8 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password - urn:camel:group:credentials + - urn:keda:authentication:password + - urn:keda:required autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -94,11 +107,16 @@ spec: description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none type: string default: "latest" + x-descriptors: + - urn:keda:metadata:offsetResetPolicy consumerGroup: title: Consumer Group description: A string that uniquely identifies the group of consumers to which this source belongs type: string example: "my-group-id" + x-descriptors: + - urn:keda:metadata:consumerGroup + - urn:keda:required dependencies: - "camel:kafka" - "camel:kamelet" diff --git a/script/validator/validator.go b/script/validator/validator.go index b7eb20b..90ec701 100644 --- a/script/validator/validator.go +++ b/script/validator/validator.go @@ -163,6 +163,15 @@ func hasXDescriptor(p camelapi.JSONSchemaProp, desc string) bool { return false } +func hasXDescriptorPrefix(p camelapi.JSONSchemaProp, prefix string) bool { + for _, d := range p.XDescriptors { + if strings.HasPrefix(d, prefix) { + return true + } + } + return false +} + func verifyInvalidContent(kamelets []KameletInfo) (errors []error) { for _, kamelet := range kamelets { ser, err := json.Marshal(&kamelet.Kamelet) @@ -430,6 +439,12 @@ func getUsedParams(k camelapi.Kamelet) map[string]bool { } params := make(map[string]bool) inspectFlowParams(flowData, params) + for propName, propVal := range k.Spec.Definition.Properties { + if hasXDescriptorPrefix(propVal, "urn:keda:") { + // Assume KEDA parameters may be used by KEDA + params[propName] = true + } + } return params } return nil