You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/04/30 09:57:30 UTC
(camel-kamelets) branch main updated: Kamelet Options: Remove the Camel K specific part and try to make the documentation agnostic
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 137f4ca4 Kamelet Options: Remove the Camel K specific part and try to make the documentation agnostic
137f4ca4 is described below
commit 137f4ca417dd424ffd719247fb8b3858ce5f7354
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 30 11:56:52 2024 +0200
Kamelet Options: Remove the Camel K specific part and try to make the documentation agnostic
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../ROOT/examples/template/kamelet-options.adoc | 112 ++++-----------------
1 file changed, 17 insertions(+), 95 deletions(-)
diff --git a/docs/modules/ROOT/examples/template/kamelet-options.adoc b/docs/modules/ROOT/examples/template/kamelet-options.adoc
index 7980ab18..5eefc71e 100644
--- a/docs/modules/ROOT/examples/template/kamelet-options.adoc
+++ b/docs/modules/ROOT/examples/template/kamelet-options.adoc
@@ -44,122 +44,44 @@ jbang app install camel@apache/camel
Supposing you have a file named route.yaml with this content:
+ifeval::['{type}' == 'source']
[source,yaml,subs='+attributes,macros']
----
- route:
from:
- uri: "kamelet:timer-source"
+ uri: "kamelet:\`{name}\`"
parameters:
- period: 10000
- message: 'test'
+ .
+ .
+ .
steps:
- to:
uri: "kamelet:log-sink"
----
-
-You can now run it directly through the following command
-
-[source,shell,subs=+attributes]
-----
-camel run route.yaml
-----
-
-== Camel K Environment Usage
-
-This section describes how you can use the \`{name}\`.
-
-=== Knative {type}
-
-ifeval::['{type}' == 'action']
-You can use the \`{name}\` Kamelet as an intermediate step in a Knative binding.
-endif::[]
-ifeval::['{type}' != 'action']
-You can use the \`{name}\` Kamelet as a Knative {type} by binding it to a Knative object.
endif::[]
-:ref-api-version: messaging.knative.dev/v1
-:ref-kind: Channel
-:ref-name: mychannel
-
-.{name}-pipe.yaml
+ifeval::['{type}' == 'sink']
[source,yaml,subs='+attributes,macros']
----
-jsonpathExpression::example$yaml/${basename}.kamelet.yaml[query='$', format='kamelets.pipe("{type}", apiVersion, kind, metadata, spec, "{ref-kind}", "{ref-api-version}", "{ref-name}")', outputFormat=yml, requires={requires}]
-----
-
-==== *Prerequisite*
-
-You have xref:{camel-k-docs-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
-
-==== *Procedure for using the cluster CLI*
-
-. Save the \`{name}-pipe.yaml\` file to your local drive, and then edit it as needed for your configuration.
-
-. Run the {type} by using the following command:
-+
-[source,shell,subs=+attributes]
-----
-kubectl apply -f {name}-pipe.yaml
-----
-
-==== *Procedure for using the Kamel CLI*
-
-Configure and run the {type} by using the following command:
-
-[source,shell,subs='+attributes,macros']
-----
-jsonpathExpression:example$yaml/${basename}.kamelet.yaml[query='$.spec', format='kamelets.pipeCommand("{type}", "{name}", definition, "channel:mychannel")', requires={requires}]
+- route:
+ from:
+ uri: "kamelet:timer-source"
+ parameters:
+ period: 10000
+ message: 'test'
+ steps:
+ - to:
+ uri: "kamelet:\`{name}\`"
----
-
-This command creates the Kamelet Pipe in the current namespace on the cluster.
-
-=== Kafka {type}
-
-ifeval::['{type}' == 'action']
-You can use the \`{name}\` Kamelet as an intermediate step in a Kafka binding.
endif::[]
-ifeval::['{type}' != 'action']
-You can use the \`{name}\` Kamelet as a Kafka {type} by binding it to a Kafka topic.
-endif::[]
-
-:ref-api-version: kafka.strimzi.io/v1beta1
-:ref-kind: KafkaTopic
-:ref-name: my-topic
-
-.{name}-pipe.yaml
-[source,yaml,subs='+attributes,macros']
-----
-jsonpathExpression::example$yaml/${basename}.kamelet.yaml[query='$', format='kamelets.pipe("{type}", apiVersion, kind, metadata, spec, "{ref-kind}", "{ref-api-version}", "{ref-name}")', outputFormat=yml, requires={requires}]
-----
-
-==== *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-docs-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
-
-==== *Procedure for using the cluster CLI*
-
-. Save the \`{name}-pipe.yaml\` file to your local drive, and then edit it as needed for your configuration.
+You can now run it directly through the following command
-. Run the {type} by using the following command:
-+
[source,shell,subs=+attributes]
----
-kubectl apply -f {name}-pipe.yaml
-----
-
-==== *Procedure for using the Kamel CLI*
-
-Configure and run the {type} by using the following command:
-
-[source,shell,subs='+attributes,macros']
-----
-jsonpathExpression::example$yaml/${basename}.kamelet.yaml[query='$.spec', format='kamelets.pipeCommand("{type}", "{name}", definition, "kafka.strimzi.io/v1beta1:KafkaTopic:my-topic")', requires={requires}]
+camel run route.yaml
----
-This command creates the Kamelet Pipe in the current namespace on the cluster.
-
== Kamelet source file
https://github.com/apache/camel-kamelets/blob/main/kamelets/{name}.kamelet.yaml