Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

[BUG] Kamelet name and description support under template #751

Closed
igarashitm opened this issue Jul 5, 2023 · 0 comments · Fixed by #761
Closed

[BUG] Kamelet name and description support under template #751

igarashitm opened this issue Jul 5, 2023 · 0 comments · Fixed by #761
Assignees
Labels
bug Something isn't working
Milestone

Comments

@igarashitm
Copy link
Contributor

igarashitm commented Jul 5, 2023

Describe the bug
Kamelet /spec/template/description is removed on YAML>JSON. It deploys fine and preserved at runtime.

YAML source

apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
  labels:
    camel.apache.org/kamelet.type: action
  name: route-9956-action
spec:
  definition:
    properties: {}
    title: ''
  dependencies:
  - camel:core
  - camel:timer
  - camel:log
  template:
    description: foobar
    from:
      uri: timer:test
      steps:
      - to:
          uri: 'log:'

kamel describe deployed

Name:	route-9956-action
Namespace:	default
Labels:	camel.apache.org/kamelet.type=action
Annotations:	kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"camel.apache.org/v1alpha1","kind":"Kamelet","metadata":{"annotations":{},"labels":{"camel.apache.org/kamelet.type":"action"},"name":"route-9956-action","namespace":"default"},"spec":{"definition":{"properties":{},"title":""},"dependencies":["camel:core","camel:timer","camel:log"],"template":{"description":"foobar","from":{"steps":[{"to":{"uri":"log:"}}],"uri":"timer:test"}}}}
Creation Timestamp:	Wed, 05 Jul 2023 16:40:40 -0400
Phase:	Ready
Definition:
  Title:	
  Description:
    
Template:
  {"description":"foobar","from":{"steps":[{"to":{"uri":"log:"}}],"uri":"timer:test"}}
Dependencies:	
  camel:core
  camel:timer
  camel:log

To Reproduce
Steps to reproduce the behavior:

  1. Paste the YAML source above
  2. Click sync button
  3. description is removed

Expected behavior
description is preserved

UPDATE:

  1. It turned out the /spec/template/description doesn't exist for camel 3.x, it seems to have been added in camel 4. /spec/template/id does exist on the other hand
  2. There're also /spec/template/route/id and /spec/template/route/description
  3. If /spec/template/id and /spec/template/route/id is specified, the Kamelet cannot be found from KameletBinding - Kamelet: template.id and/or template.route.id causes a failure to be resolved apache/camel-k#4546
@igarashitm igarashitm added the bug Something isn't working label Jul 5, 2023
@igarashitm igarashitm added this to the 1.1.0 milestone Jul 5, 2023
@igarashitm igarashitm self-assigned this Jul 5, 2023
@igarashitm igarashitm changed the title [BUG] Kamelet /spec/template/description is removed on YAML>JSON [BUG] Kamelet name and description support under template Jul 6, 2023
Delawen pushed a commit that referenced this issue Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant