Skip to content

Commit

Permalink
chore: Update Website generator
Browse files Browse the repository at this point in the history
- Replace outdated KameletBinding with Pipe resources in examples
- Simplify template generator
  • Loading branch information
christophd committed May 15, 2024
1 parent b187695 commit 63543de
Show file tree
Hide file tree
Showing 259 changed files with 1,227 additions and 1,218 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: release-2.3.x
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Build
run: |
cd docs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: {{ .Kamelet.ObjectMeta.Name }}-binding
name: {{ .Kamelet.ObjectMeta.Name }}-pipe
spec:
{{ if eq (index .Kamelet.ObjectMeta.Labels "camel.apache.org/kamelet.type") "sink" }}source:
ref:
Expand Down Expand Up @@ -40,4 +40,4 @@ spec:
kind: {{ .GetVal "RefKind" }}
apiVersion: {{ .GetVal "RefApiVersion" }}
name: {{ .GetVal "RefName" }}
{{ end }}
{{ end }}
14 changes: 7 additions & 7 deletions docs/modules/ROOT/kamelet.adoc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `{{ .Kamelet.ObjectMeta.Name }}` Kamelet does not specify any configuration

At runtime, the `{{ .Kamelet.ObjectMeta.Name }}` Kamelet relies upon the presence of the following dependencies:
{{range .Kamelet.Spec.Dependencies}}
- {{ . }}{{end}}
- {{ . }}{{end}}

== Usage

Expand All @@ -37,9 +37,9 @@ You can use the `{{ .Kamelet.ObjectMeta.Name }}` Kamelet as a Knative {{ index .
[source,yaml]
----
{{ if .GenerateExampleBinding }}
{{- template "kamelet-binding-sink-source.tmpl" . -}}
{{- template "kamelet-pipe.tmpl" . -}}
{{ else }}
{{- .ReadKameletBindingExample .Kamelet.ObjectMeta.Name -}}
{{- .ReadBindingExample .Kamelet.ObjectMeta.Name -}}
{{ end }}
----

Expand Down Expand Up @@ -67,7 +67,7 @@ Configure and run the {{ index .Kamelet.ObjectMeta.Labels "camel.apache.org/kame
{{ .ExampleKamelBindCommand "channel:mychannel" }}
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

=== Kafka {{ index .Kamelet.ObjectMeta.Labels "camel.apache.org/kamelet.type" | ToCamel }}

Expand All @@ -80,9 +80,9 @@ You can use the `{{ .Kamelet.ObjectMeta.Name }}` Kamelet as a Kafka {{ index .Ka
[source,yaml]
----
{{ if .GenerateExampleBinding }}
{{- template "kamelet-binding-sink-source.tmpl" . -}}
{{- template "kamelet-pipe.tmpl" . -}}
{{ else }}
{{- .ReadKameletBindingExample .Kamelet.ObjectMeta.Name -}}
{{- .ReadBindingExample .Kamelet.ObjectMeta.Name -}}
{{ end }}
----

Expand Down Expand Up @@ -111,7 +111,7 @@ Configure and run the {{ index .Kamelet.ObjectMeta.Labels "camel.apache.org/kame
{{ .ExampleKamelBindCommand "kafka.strimzi.io/v1beta1:KafkaTopic:my-topic" }}
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

== Kamelet source file

Expand Down
18 changes: 9 additions & 9 deletions docs/modules/ROOT/pages/avro-deserialize-action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ At runtime, the `avro-deserialize-action` Kamelet relies upon the presence of th

- camel:kamelet
- camel:core
- camel:jackson-avro
- camel:jackson-avro

== Usage

Expand All @@ -39,9 +39,9 @@ You can use the `avro-deserialize-action` Kamelet as an intermediate step in a K
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: avro-deserialize-action-binding
name: avro-deserialize-action-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -100,11 +100,11 @@ Configure and run the action by using the following command:

[source,shell]
----
kamel bind --name avro-deserialize-action-binding timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step avro-deserialize-action -p step-2.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step json-serialize-action channel:mychannel
kamel bind --name avro-deserialize-action-pipe timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step avro-deserialize-action -p step-2.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step json-serialize-action channel:mychannel
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

=== Kafka Action

Expand All @@ -114,9 +114,9 @@ You can use the `avro-deserialize-action` Kamelet as an intermediate step in a K
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: avro-deserialize-action-binding
name: avro-deserialize-action-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -176,11 +176,11 @@ Configure and run the action by using the following command:

[source,shell]
----
kamel bind --name avro-deserialize-action-binding timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step avro-deserialize-action -p step-2.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step json-serialize-action kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
kamel bind --name avro-deserialize-action-pipe timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step avro-deserialize-action -p step-2.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' --step json-serialize-action kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

== Kamelet source file

Expand Down
18 changes: 9 additions & 9 deletions docs/modules/ROOT/pages/avro-serialize-action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ At runtime, the `avro-serialize-action` Kamelet relies upon the presence of the

- camel:kamelet
- camel:core
- camel:jackson-avro
- camel:jackson-avro

== Usage

Expand All @@ -39,9 +39,9 @@ You can use the `avro-serialize-action` Kamelet as an intermediate step in a Kna
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: avro-serialize-action-binding
name: avro-serialize-action-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -90,11 +90,11 @@ Configure and run the action by using the following command:

[source,shell]
----
kamel bind --name avro-serialize-action-binding timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' channel:mychannel
kamel bind --name avro-serialize-action-pipe timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' channel:mychannel
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

=== Kafka Action

Expand All @@ -104,9 +104,9 @@ You can use the `avro-serialize-action` Kamelet as an intermediate step in a Kaf
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: avro-serialize-action-binding
name: avro-serialize-action-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -156,11 +156,11 @@ Configure and run the action by using the following command:

[source,shell]
----
kamel bind --name avro-serialize-action-binding timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
kamel bind --name avro-serialize-action-pipe timer-source?message='{"first":"Ada","last":"Lovelace"}' --step json-deserialize-action --step avro-serialize-action -p step-1.schema='{"type": "record", "namespace": "com.example", "name": "FullName", "fields": [{"name": "first", "type": "string"},{"name": "last", "type": "string"}]}' kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

== Kamelet source file

Expand Down
14 changes: 7 additions & 7 deletions docs/modules/ROOT/pages/aws-cloudwatch-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At runtime, the `aws-cloudwatch-sink` Kamelet relies upon the presence of the fo

- camel:core
- camel:aws2-cw
- camel:kamelet
- camel:kamelet

== Usage

Expand All @@ -57,9 +57,9 @@ You can use the `aws-cloudwatch-sink` Kamelet as a Knative sink by binding it to
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: aws-cloudwatch-sink-binding
name: aws-cloudwatch-sink-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -101,7 +101,7 @@ Configure and run the sink by using the following command:
kamel bind channel:mychannel aws-cloudwatch-sink -p "sink.cwNamespace=The Cloud Watch Namespace" -p "sink.region=The AWS Region"
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

=== Kafka Sink

Expand All @@ -111,9 +111,9 @@ You can use the `aws-cloudwatch-sink` Kamelet as a Kafka sink by binding it to a
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: aws-cloudwatch-sink-binding
name: aws-cloudwatch-sink-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -156,7 +156,7 @@ Configure and run the sink by using the following command:
kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic aws-cloudwatch-sink -p "sink.cwNamespace=The Cloud Watch Namespace" -p "sink.region=The AWS Region"
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

== Kamelet source file

Expand Down
14 changes: 7 additions & 7 deletions docs/modules/ROOT/pages/aws-ddb-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ At runtime, the `aws-ddb-sink` Kamelet relies upon the presence of the following
- camel:core
- camel:jackson
- camel:aws2-ddb
- camel:kamelet
- camel:kamelet

== Usage

Expand All @@ -63,9 +63,9 @@ You can use the `aws-ddb-sink` Kamelet as a Knative sink by binding it to a Knat
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: aws-ddb-sink-binding
name: aws-ddb-sink-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -107,7 +107,7 @@ Configure and run the sink by using the following command:
kamel bind channel:mychannel aws-ddb-sink -p "sink.region=The AWS Region" -p "sink.table=The Table"
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

=== Kafka Sink

Expand All @@ -117,9 +117,9 @@ You can use the `aws-ddb-sink` Kamelet as a Kafka sink by binding it to a Kafka
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: aws-ddb-sink-binding
name: aws-ddb-sink-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -162,7 +162,7 @@ Configure and run the sink by using the following command:
kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic aws-ddb-sink -p "sink.region=The AWS Region" -p "sink.table=The Table"
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

== Kamelet source file

Expand Down
14 changes: 7 additions & 7 deletions docs/modules/ROOT/pages/aws-ddb-streams-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ At runtime, the `aws-ddb-streams-source` Kamelet relies upon the presence of the
- mvn:org.apache.camel.kamelets:camel-kamelets-utils:2.3.0
- camel:gson
- camel:aws2-ddb
- camel:kamelet
- camel:kamelet

== Usage

Expand All @@ -51,9 +51,9 @@ You can use the `aws-ddb-streams-source` Kamelet as a Knative source by binding
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: aws-ddb-streams-source-binding
name: aws-ddb-streams-source-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -95,7 +95,7 @@ Configure and run the source by using the following command:
kamel bind aws-ddb-streams-source -p "source.region=The AWS Region" -p "source.table=The Table" channel:mychannel
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

=== Kafka Source

Expand All @@ -105,9 +105,9 @@ You can use the `aws-ddb-streams-source` Kamelet as a Kafka source by binding it
[source,yaml]
----
apiVersion: camel.apache.org/v1
kind: KameletBinding
kind: Pipe
metadata:
name: aws-ddb-streams-source-binding
name: aws-ddb-streams-source-pipe
spec:
source:
ref:
Expand Down Expand Up @@ -150,7 +150,7 @@ Configure and run the source by using the following command:
kamel bind aws-ddb-streams-source -p "source.region=The AWS Region" -p "source.table=The Table" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
----

This command creates the KameletBinding in the current namespace on the cluster.
This command creates the Pipe in the current namespace on the cluster.

== Kamelet source file

Expand Down
Loading

0 comments on commit 63543de

Please sign in to comment.