Repository navigation
chore: Kamelet options must not use a name the kamelet: component takes, such as location - #3201
Merged
oscerd merged 1 commit intoNov 18, 2026
Conversation
…es, such as location The kamelet: component keeps some parameters of a kamelet: endpoint for itself: location is where it loads the Kamelet from, templateId, routeId and uuid are removed, and block, timeout, failIfNoConsumers, noErrorHandler, advancedOptions, bridgeErrorHandler, exceptionHandler, exchangePattern and lazyStartProducer configure the kamelet: endpoint. A Kamelet option with one of these names never reaches the template when it is given as a parameter of the kamelet: endpoint. - google-vertexai-sink: location -> region (required; the Kamelet could not start with kamelet:google-vertexai-sink?location=...). Mapped to the location of the google-vertexai component. - ibm-cos-sink, ibm-cos-source: location -> region. Mapped to the location of the ibm-cos component, which only shows it in the service metadata; the region used is the one of endpointUrl. - fhir-sink, pulsar-sink: lazyStartProducer -> lazyStart. Mapped to the lazyStartProducer of the fhir and pulsar components. The catalog validator now fails the build on a Kamelet property with one of these names, and the developer guide says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oscerd
approved these changes
Nov 18, 2026
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
kamelet:component (KameletComponent.createEndpointin apache/camel) keeps some parameters of akamelet:endpoint for itself, before the template sees them:locationis read as the place to load the Kamelet YAML from, then removed;templateId,routeIdanduuidare removed;block,timeout,failIfNoConsumers,noErrorHandler,advancedOptions, and the endpoint options every endpoint has (bridgeErrorHandler,exceptionHandler,exchangePattern,lazyStartProducer), configure thekamelet:endpoint.So a Kamelet option with one of these names never reaches the template when it is set as a parameter of
kamelet:. Five Kamelets on main have such an option:kamelet:<name>?<option>=...google-vertexai-sinklocation(required)FileNotFoundException: Resource not found: classpath:us-central1/google-vertexai-sink.kamelet.yaml→Cannot find Kamelet with name: google-vertexai-sink. Because the option is required, the Kamelet can never be used with its options askamelet:parameters.ibm-cos-sinklocationResource not found: classpath:us-south/ibm-cos-sink.kamelet.yaml→Cannot find Kamelet with name: ibm-cos-sink. Every example on the documentation page setslocation.ibm-cos-sourcelocationResource not found: classpath:us-south/ibm-cos-source.kamelet.yaml.pulsar-sinklazyStartProducerlazyStartProducer=trueand no Pulsar to reach, the integration still fails to start (Connection refused).fhir-sinklazyStartProducerfhir:endpoint getslazyStartProducer=false.No Kamelet on main has an option named after the other reserved names.
Change
The options are renamed; the template maps the new name to the option of the wrapped component, which keeps its name:
google-vertexai-sinklocationregion(required)location: "{{region}}"ibm-cos-sinklocationregionlocation: "{{?region}}"ibm-cos-sourcelocationregionlocation: "{{?region}}"fhir-sinklazyStartProducerlazyStartlazyStartProducer={{lazyStart}}pulsar-sinklazyStartProducerlazyStartlazyStartProducer={{?lazyStart}}The descriptions, the
google-vertexai-sinkandibm-cos-*documentation partials (the examples usedlocation), and the library copies are updated. Thegoogle-vertexai-sinkdescription no longer needs its note about the workaround.For
ibm-cos-*, the option only feeds the service metadata of theibm-cosendpoint (camel get service --metadatashowslocation=us-south); the region used to connect is the one ofendpointUrl, as the description already said. It is kept, renamed, rather than removed.Validator rule.
CatalogValidator.verifyReservedPropertyNames(kamelets-maven-plugin) fails the build when a Kamelet declares a property whose name, ignoring case, is one of:templateId,routeId,location,uuid,block,timeout,failIfNoConsumers,noErrorHandler,advancedOptions,bridgeErrorHandler,exceptionHandler,exchangePattern,lazyStartProducer. With main'sibm-cos-sinkput back, the build fails with:CatalogValidatorTestcovers it, and the developer guide (development.adoc) says which names to avoid.Breaking change
The old option names did work through another path: Kamelet properties set as
camel.kamelet.<name>.<option>(orcamel.kamelet.<name>.<routeId>.<option>) reach the template, because only thekamelet:URI parameters are taken by the component. Verified on main:camel.kamelet.ibm-cos-sink.location=us-southgives theibm-cosendpointlocation=us-south, andcamel.kamelet.pulsar-sink.lazyStartProducer=truelets the integration start without Pulsar. Camel K passes the properties of a Pipe in this form (camel.kamelet.<name>.<id>.<option>, seepkg/util/bindingsin camel-k), so Pipes on Camel K that setlocationorlazyStartProducerworked, and must now use the new name:google-vertexai-sink: the old name now fails at startup:Route template google-vertexai-sink the following mandatory parameters must be provided: region(verified withcamel.kamelet.google-vertexai-sink.location).ibm-cos-*: the old name is ignored; only the service metadata loses the region.fhir-sink,pulsar-sink: the old name is ignored, so the connection is made at startup again, and the integration may fail to start when the server cannot be reached.The renames are added to the upgrade notes in #3190, for the Camel 4.24 upgrade guide (apache/camel#30331).
Verification
Camel JBang 4.24.0-SNAPSHOT,
camel run route.yaml --local-kamelet-dir=<dir>, with main's Kamelets and with this branch's. No cloud account: dummy credentials.kamelet:parameterkamelet:parameteribm-cos-sinkResource not found: classpath:us-south/ibm-cos-sink.kamelet.yaml,Cannot find Kamelet with name: ibm-cos-sinkregion: us-south: startsibm-cos://my-bucket?...&location=us-south&...;camel get service --metadata:location=us-southToken retrieval from IAM service failedibm-cos-sourceResource not found: classpath:us-south/ibm-cos-source.kamelet.yaml,Cannot find Kamelet with name: ibm-cos-sourceregion: us-south: startsibm-cos://my-bucket?...&location=us-south&...google-vertexai-sinkResource not found: classpath:us-central1/google-vertexai-sink.kamelet.yaml,Cannot find Kamelet with name: google-vertexai-sinkregion: us-central1: starts (*)google-vertexai://my-project-123:us-central1:gemini-2.5-flash?operation=generateText403 PERMISSION_DENIED ... project my-project-123pulsar-sinklazyStartProducer: true, no Pulsar: fails to start,Connection refusedlazyStart: true, no Pulsar: startspulsar://persistent/public/default/test?...&lazyStartProducer=true&...fhir-sinklazyStartProducer: true: starts, but thefhir:endpoint haslazyStartProducer=falselazyStart: true: startsfhir:endpoint haslazyStartProducer=true(*) With plain
camel run, the Vertex AI endpoint fails to start, after the Kamelet is loaded, withNoClassDefFoundError: com/google/protobuf/RuntimeVersion$RuntimeDomain: the Vertex AI client needs a newer protobuf than JBang has on its classpath, whatever the Kamelet. It ran with--dep=com.google.protobuf:protobuf-java:4.35.1. This is a JBang classpath problem and is not fixed here.Build:
./mvnw clean verify -DskipTestsand./mvnw clean verifypass.Claude Code on behalf of Claus Ibsen
🤖 Generated with Claude Code