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

No way to configure Ingress Trait with annotations #1535

Closed
xytis opened this issue Jun 16, 2020 · 3 comments
Closed

No way to configure Ingress Trait with annotations #1535

xytis opened this issue Jun 16, 2020 · 3 comments
Milestone

Comments

@xytis
Copy link

xytis commented Jun 16, 2020

In many kubernetes deployments, machinery is in place that reacts to Ingress object annotations.

What would be the prefered way to implement passing down these annotations to Ingress Trait object?

Extra: Would it be possible to configure TLS on Ingress Trait object?

@nicolaferraro
Copy link
Member

There's currently an easy way to pass labels as:

kamel run ... --label mylabel=avalue -t owner.target-labels=mylabel

The --label flag labels the integration, while the trait owner.target-labels allows to forward them to all sub resources (including the ingress).

Although there's no corresponding --annotation flag (we should add it), if you manually annotate the integration with your annotations, there's a trait option owner.target-annotations to select the annotations to forward to sub resources.

Btw, @xytis can you provide some more references about the way the ingress can be configured via annotations, so we may find a better way to configure it, including TLS support.

@xytis
Copy link
Author

xytis commented Jun 17, 2020

In my experience, Ingress objects generally require at least one annotation: kubernetes.io/ingress.class: <ingress-class-name>. Depending on ingress provider, there could be more annotations, that configure the provider. (Examples: Traefik, Nginx, AWS)
Annotations can be complex JSON objects or multiline strings, so passing them through command line is not always viable.

Regarding TLS support, it is a part of current standard Ingress API, but I usually use it in conjunction with certificate manager, which requires even more annotation based configuration.

Overall, for now it seems that the best way to handle these kinds of scenarios would be to create the ingress object externally and use service trait to expose the integration.

@nicolaferraro nicolaferraro added this to the 1.1.0 milestone Jun 17, 2020
@nicolaferraro nicolaferraro modified the milestones: 1.1.0, 1.2.0 Jul 16, 2020
@nicolaferraro nicolaferraro modified the milestones: 1.2.0, 1.3.0 Oct 13, 2020
@nicolaferraro nicolaferraro modified the milestones: 1.3.0, 1.4.0 Dec 22, 2020
@nicolaferraro nicolaferraro modified the milestones: 1.4.0, 1.5.0 Apr 13, 2021
@nicolaferraro nicolaferraro modified the milestones: 1.5.0, 1.6.0 Jul 5, 2021
@nicolaferraro nicolaferraro modified the milestones: 1.6.0, 1.7.0 Sep 7, 2021
@nicolaferraro nicolaferraro modified the milestones: 1.7.0, 1.8.0 Nov 15, 2021
@oscerd oscerd modified the milestones: 1.8.0, 1.9.0 Jan 19, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

@oscerd oscerd modified the milestones: 1.9.0, 1.9.1 Apr 26, 2022
@oscerd oscerd modified the milestones: 1.9.1, 1.9.2 May 13, 2022
@oscerd oscerd modified the milestones: 1.9.2, 2.0.0 May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants