davsclaus opened a new pull request, #3394:
URL: https://github.com/apache/camel-kamelets/pull/3394
Fixes #3393.
The catalog had a guide for writing Kamelets, but none for using them. The
testing and data type docs still described Pipes, which Camel core no longer
loads.
## New pages
- **`using.adoc` (user guide):**
- using a Kamelet from YAML, Java and XML routes;
- the four places options are set, and which one wins: URI parameter >
`CAMEL_KAMELET_<NAME>_<OPTION>` > `camel.kamelet.<name>.<id>.<option>` >
`camel.kamelet.<name>.<option>` > default;
- per-use ids with `kamelet:<name>/<id>`;
- the `template-properties`/`route-properties` component options, and that
they switch off every `camel.kamelet.*` property;
- secrets from `{{env:}}` or a vault;
- dependencies for Camel Main, Spring Boot and Quarkus;
- `location`;
- choosing a data type with `data-type-action`;
- error handling;
- pitfalls: reserved option names, an unset `{{?user}}` resolving `$USER`
(CAMEL-27498), and `Camel*` headers.
`index.adoc` and `README.md` link to it, in place of the "Kamelets User
Guide" that didn't exist and the Camel K docs.
- **`testing.adoc`:** how the route-based Citrus tests are built, using the
real `log-sink`, `timer-to-http`, `extract-field-action` and `redis-sink` tests
as examples. It covers the IT class and `ServerPorts`, Testcontainers
variables, what makes a good test, how to run the tests, and what to do when
one fails. It replaces the Pipe-based Testing section of the developer guide.
## Pipes removed
- `templates/pipes/` (289 files). Nothing read them: the per-Kamelet page
template (`kamelet-options.adoc`) no longer calls `kamelets.pipe()`.
- In `kamelets.js`, the Pipe generator functions: `pipe`, `pipeCommand` and
their helpers. `sort`, `icon`, `templateHeader` and `branch` are kept.
- The `KameletBinding` examples in 13 doc partials are now YAML routes.
Their parameters were checked against each Kamelet. The kafka-batch-source
example was missing `saslAuthType`, which is required, so it's added.
- **Developer guide:**
- the Pipe, `kubectl` and `kamel` examples are now routes run with `camel
run`;
- the data types section shows the `format:` a type needs to convert
anything, and how a route chooses a type with `data-type-action`;
- the JSON → Avro example was run (`avro/binary: 11 bytes`);
- the old OpenShift password descriptor is replaced with
`urn:camel:group:credentials`.
- **Tests:**
- the Knative `.feature` tests and their two Pipe files are removed;
nothing ran them;
- `aws-s3-uri-pipe` and `aws-sqs-uri-pipe` are renamed after the source
routes they run;
- stale README text is fixed.
- The last Pipe mentions in `AGENTS.md` and the security model.
## Checks
- `./mvnw verify` from the root passes.
- `AwsIT#awsS3+awsSqs` and `CommonIT#log+counter` pass: 15 tests, including
the two renamed ones.
- Every option-precedence claim in `using.adoc` was checked with a test
Kamelet and `camel run`. So were the YAML/Java/XML examples, the
comma-separated `location`, and the missing-option error message.
- Asciidoctor reports no warnings on the changed pages.
## Found along the way (not changed here)
- The javadoc of `Kamelet.extractKameletEnvironmentVariables` in Camel core
says `CAMEL_KAMELET_AWSS3SOURCE_BUCKETNAMEORARN` works. Only the `_`-separated
form works.
- The Camel CLI from Camel main runs catalog 4.23.0 by default
(`camel-kamelets-version` in `camel-launcher`). The `json-deserialize-action`
of older catalogs fails with Jackson 3.
The Camel core side, configuring and testing a Kamelet in the
`camel-kamelet` component docs, is in a separate Camel PR.
_Claude Code on behalf of Claus Ibsen_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]