Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure traits using annotations #2165

Closed
lburgazzoli opened this issue Mar 23, 2021 · 3 comments · Fixed by #2338
Closed

Allow to configure traits using annotations #2165

lburgazzoli opened this issue Mar 23, 2021 · 3 comments · Fixed by #2338
Assignees
Labels
area/core Core features of the integration platform

Comments

@lburgazzoli
Copy link
Contributor

lburgazzoli commented Mar 23, 2021

Configuring traits may be a little bit complex for tooling in particular when configuring a KameletBinding where as example, to configure the service binding, one has to rescue the integration spec, like:

apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: my-binding
spec:
  integration:
    traits:
      service-binding:
        configuration:
          serviceBindings:
          - postgres.org:v1alpha1:PostgreSQL

It would much more practical to have options to use annotations that re well known and we can use the json schema for the traits to let tools know what options are available for each trait so you can re-write the example above as:

apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: my-binding
  annotations:
    trait.camel.apache.org/service-binding.bindings=postgres.org:v1alpha1:PostgreSQL

/cc @nicolaferraro @astefanutti what do you think ?

@astefanutti
Copy link
Member

astefanutti commented Mar 25, 2021

That's a good idea.

My understanding is that the traits.yaml schema file contains the CLI properties, rather than the JSON properties, as it's used by tooling for modeline IIRC.

I don't think we have a proper JSON schema for traits yet, see #1614.

@lburgazzoli
Copy link
Contributor Author

I don't think we have a proper JSON schema for traits yet, see #1614.

A ok, I thought it was already there but it is not a big issue IMHO and we can introduce support later on.

@astefanutti
Copy link
Member

I agree. That'll motivate me to work back on #1624 😅.

@astefanutti astefanutti added the area/core Core features of the integration platform label Mar 26, 2021
@nicolaferraro nicolaferraro self-assigned this May 26, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue May 27, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue May 27, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Jun 3, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Core features of the integration platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants