Skip to content

WanakuCamelRoute CRD

The WanakuCamelRoute custom resource lets you define Apache Camel routes and MCP metadata directly in a Kubernetes CR. The operator packages the route into a service catalog and deploys it to the router automatically.

When to use WanakuCamelRoute vs WanakuServiceCatalog

FeatureWanakuCamelRouteWanakuServiceCatalog
Route definitionInline in CR specExternal ConfigMap (Base64 ZIP)
PackagingAutomatic (operator handles it)Manual (wanaku service package)
Best forSingle-route tools/resourcesMulti-service catalogs, complex setups
DependenciesNot supported (use capability image)Supported via .dependencies.txt
GitOps friendlyYes (single YAML file)Requires ConfigMap + CR

Use WanakuCamelRoute for simple integrations where a single Camel route exposes one or more MCP tools/resources. Use WanakuServiceCatalog for complex multi-service catalogs or when you need custom Maven dependencies.

Spec Fields

routerRef (required)

Name of the WanakuRouter CR in the same namespace. The operator deploys the service catalog to this router.

yaml
spec:
  routerRef: my-router

image (optional)

Container image used for the generated Camel Integration Capability deployment. If omitted, the operator uses quay.io/wanaku/camel-integration-capability:latest.

yaml
spec:
  image: quay.io/wanaku/camel-integration-capability:0.2.0

route (required)

The Apache Camel route definition in YAML DSL. This is a free-form field that accepts any valid Camel YAML route structure.

yaml
spec:
  route:
    - route:
        id: my-route
        from:
          uri: direct:wanaku
          steps:
            - to:
                uri: https://api.example.com/search

The route id must match the routeId referenced in the MCP tool/resource definitions.

mcp (required)

MCP metadata that defines how the Camel route is exposed as tools and/or resources.

Tools

yaml
spec:
  mcp:
    tools:
      - name: search-tool
        routeId: my-route
        description: Search for information
        properties:
          - name: wanaku_body
            type: string
            description: The search query
            required: true

Resources

yaml
spec:
  mcp:
    resources:
      - name: s3-reader
        routeId: s3-route
        description: Read objects from S3
        uri: wanaku://s3-reader
        mimeType: application/octet-stream

properties (optional)

Key-value pairs for Camel property placeholders used in the route. Use syntax for values that should be parameterized as templates.

yaml
spec:
  properties:
    api.key: "{{api.key}}"
    base.url: "https://api.example.com"

Status Fields

FieldDescription
conditionsStandard Kubernetes conditions. Ready=True when deployed.
deployedCatalogNameName of the service catalog deployed to the router.
registeredToolsList of MCP tool names registered from this CR.
registeredResourcesList of MCP resource names registered from this CR.

Examples

See the examples directory for complete working examples:

Troubleshooting

"routerRef must be specified"

The routerRef field is missing or empty. Set it to the name of an existing WanakuRouter CR.

"Referenced WanakuRouter not found"

The WanakuRouter CR specified by routerRef does not exist in the same namespace. Create the router first:

bash
kubectl get wanakurouters -n <namespace>

"Failed to deploy service catalog"

The operator could not reach the router's REST API. Check that the router pod is running and the internal service internal-<routerRef> is reachable.

CR stuck without Ready condition

Check operator logs for errors:

bash
kubectl logs -l app.kubernetes.io/name=wanaku-operator -n <namespace>